Improving support for React 18 :)
See original GitHub issueImproving the support for new React 18
Hi , I am requesting this feature after viewing it on vercel’s (maintainers of Next js) styled jsx library, for more info please take a look at their discussion about it 👍
We can add useInsertionEffect for better hydration & concurrent support 💯 (for more info about useInsertionEffect click here )
- But this only support in React 18 so we need to implement fallback like below
const useInsertionEffect = React.useInsertionEffect || React.useLayoutEffect
(inspired by Next Js)
I am extremely sorry if I told or made any mistakes 😌
Issue Analytics
- State:
- Created 2 years ago
- Reactions:9
- Comments:11 (4 by maintainers)
Top Results From Across the Web
How to Upgrade to React 18
How to Upgrade to React 18 · Installing · Updates to Client Rendering APIs · Updates to Server Rendering APIs · Updates to...
Read more >An Ultimate Guide to Upgrading to React 18 - OpenReplay Blog
How to upgrade your React app to take advantage of new features.
Read more >React 18 Upgrade Guide and New Features - Refine Dev
React 18 was released! Are you looking to upgrade to React 18? Learn about the new features and changes in this comprehensive guide....
Read more >Upgrading to React 18 with TypeScript - LogRocket Blog
The upgrade of the React type definitions to support React 18 involved some significant breaking changes that developers should know about.
Read more >Upgrade to react 18 — Issues and resolution - Dev Genius
4. Upgrade react-redux to 8, since redux 8 has support for react 18. In version 8, React Redux's two public APIs ( connect...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Is it working?
Below is my packages:
@emotion/cache@11.7.1 @emotion/react@11.9.0 @emotion/server@11.4.0 @emotion/styled@11.8.1
All the packages are in latest version but I am still getting this error. TypeError: Cannot read property ‘useContext’ of null
Anyhelp will be great.
Here is a repo that shows the current failure when trying to use emotion with next.js 18 / concurrent mode:
https://github.com/miracle2k/next-rsc-demo
In addition, there is a different error if you try to use it as part of a server component.