Skip to content

[10.0.0-alpha.4] preact/compat createPortal does not perform like React #1535

@MichaelRando

Description

@MichaelRando

For preact 8 I successfully used preact-portal to render outside my root node. In preactX, I'd like to switch over to the createPortal() API; but it hasn't worked for me in either X or 8.x.
I had enough time today to construct a repo that demonstrates that the portal content does not remove on unmount.
you can run the code under either react or preactX and observe the difference.

https://github.com/MichaelRando/preact-portal-problem

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions