Skip to content

Compatibility with createRoot for latest concurrent mode #1529

@SamyPesse

Description

@SamyPesse

Using react-native-web relies on AppRegistry.runApplication which doesn't use ReactDOM.createRoot. It means that using suspense with react-native-web is only possible using the previous Suspense API (<React.unstable_ConcurrentMode>), since then the React had released great new concurrent APIs such as useTransition, or useDeferredValue.

Supporting concurrent mode with react-native-web will require:

I think a potential solution in the short term could be to use ReactDOM.createRoot when an option is passed to AppRegistry.runApplication so that it supports both latest and older react versions.

I'd be happy to open a PR for such changes if you agree with such implementation :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    has: prSubject of a pull requestproject:react-native-webIssue associated with react-native-web

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions