Skip to content

Create a ui-request-render-data #106

@kentcdodds

Description

@kentcdodds

Right now, ui-lifecycle-iframe-render-data is supposed to be posted from the parent when ui-lifecycle-iframe-ready is from the child. This kind of makes sense, but it's a bit of a surprising side-effect. And in my experience it's not working (hence my utility keeps a queue of render data messages so I can get them once my components are ready for them).

I think it would make more sense for me to specifically request the render data from the parent when I'm ready for it. That way I could even request it later if I wanted to.

Then I could use my existing sendMcpMessage utility: #100 (comment)

const renderData = await sendMcpMessage(
	'ui-request-render-data',
	{},
	{ schema: renderDataSchema },
)

Or something like that.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions