Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Support cross-renderer portals #13332

Open
@gaearon

Description

@gaearon

CurrentlycreatePortal only works within the current renderer.

This means that if you want to embed one renderer into another (e.g.react-art inreact-dom), your only option is to do an imperative render in a commit-time hook likecomponentDidMount orcomponentDidUpdate of the outer renderer's component. In fact that's exactly howreact-art works today.

With this approach, nested renderers likereact-art can't read the context of the outer renderers (#12796). Similarly, we can't time-slice updates in inner renderers because we only update the inner container at the host renderer's commit time.

At the time we originally discussed portals we wanted to make them work across renderers. So that you could do something like

<div><Portalto={ReactART}><surface><rect/></surface></Portal></div>

But it's not super clear how this should work because renderers can bundle incompatible Fiber implementations. Whose implementation takes charge?

We'll want to figure something out eventually. For now I'm filing this for future reference.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp