Skip to content

createRoot #42

Closed
Closed
@andys8

Description

@andys8

I'm trying to figure out details about createRoot.

It is the new default function to initialize a react app (v18).

https://github.com/lumihq/purescript-react-basic-dom/blob/53dfc605a1dd91dbc12df160b445156e6a6626af/src/React/Basic/DOM/Concurrent.js#L2-L8

createRoot functionality

Is this createRoot the same function as the ones referred to in the docs imported from react-dom/client? In any case a more prominent export of the function (similar to render) could be helpful.

createRoot name conflict issue

And Concurrent.js might currently be flawed. The names createRoot and createBlockingRoot are both defines as constants and then in functions with the same names are created. This will result in a SyntaxError.

image

PS: I remember I created another createRoot related issue somewhere in the past in a different repository. Not sure anymore where 🤔 Sorry for duplication

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions