-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
has: prSubject of a pull requestSubject of a pull requestproject:react-native-webIssue associated with react-native-webIssue associated with react-native-web
Milestone
Description
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:
- Replace uses of deprecated React API (legacy context Remove all use of legacy context API #1506, findDOMNode)
- Use
ReactDOM.createRootinrenderApplication
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 :)
gut4, ecreeth, raajnadar, jedd-s, hsjoberg and 6 morealexlevy0 and MalgoBlock
Metadata
Metadata
Assignees
Labels
has: prSubject of a pull requestSubject of a pull requestproject:react-native-webIssue associated with react-native-webIssue associated with react-native-web