When will React be upgraded to 18? #3056
-
When will React be upgraded to 18? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Remix is already React v18 compatible. Templates will be updated once #2540 is merged. |
Beta Was this translation helpful? Give feedback.
-
I'd add that due to issues with browser dev tools injecting into the DOM, you can easily get a broken dev build if you use the new hydrateRoot. Being new to remix it took me way too long to work out that this wasn't something that I'd done wrong. see #2947 and facebook/react#22833 for more details. Right now I'm using this. if (process.env.NODE_ENV !== 'production') {
console.warn(
'Using ReactDOM.hydrate rather than hydrateRoot until the latter is patched to not break when dev tools inject into the dom'
)
require('react-dom').hydrate(<RemixBrowser />, document)
} else {
hydrateRoot(document, <RemixBrowser />)
} Hopefully this will stop being an issue fairly soon. |
Beta Was this translation helpful? Give feedback.
Remix is already React v18 compatible.
Templates will be updated once #2540 is merged.