Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React Compiler / React 19 #111

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from
Draft

Conversation

@tordans tordans changed the title React compiler react 19 React Compiler / React 19 May 24, 2024
package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
@tordans
Copy link
Contributor Author

tordans commented May 29, 2024

Did a new test today with updated packages after tailwindlabs/headlessui#3167 (comment). Results are here: 47ng/nuqs#566 (comment)

React19: Fix build by extracting const in a separate file

The build did not like that we imported the useMapParam file inside the middleware even though we only picked the mapParamFallback const from it. Moving the const to a separate file resolved the issue.

Update to react 19-rc

Following https://react.dev/blog/2024/04/25/react-19-upgrade-guide

And https://nextjs.org/blog/next-15-rc#react-compiler-experimental

React19: Update "Removed deprecated TypeScript types"

`npx types-react-codemod@latest preset-19 ./`

https://react.dev/blog/2024/04/25/react-19-upgrade-guide#removed-deprecated-typescript-types

And then fix the useRef type to add `undefined`

Update next, react packages to latest RC version

`npm install next@canary babel-plugin-react-compiler react@rc react-dom@rc types-react@rc types-react-dom@rc`

Update to `@headlessui/react@insiders` to test React 19 fix

Update to `@headlessui/react@insiders` to test React 19 fix; And update everything else as well

`npm install @headlessui/react@insiders next@canary babel-plugin-react-compiler react@rc react-dom@rc types-react@rc types-react-dom@rc`

Update RC packages

`npm install next@canary babel-plugin-react-compiler@latest react@rc react-dom@rc types-react@rc types-react-dom@rc nuqs@latest @headlessui/react@insiders`

Update packages nuqs:2, other packages

`npm install next@canary babel-plugin-react-compiler@latest react@rc react-dom@rc types-react@rc types-react-dom@rc @headlessui/react@insiders`
`npm i [email protected]`

Update "bleach" commands

Update packages 2024-08-05: `npm install next@canary babel-plugin-react-compiler@latest react@rc react-dom@rc types-react@rc types-react-dom@rc @headlessui/react@insiders [email protected]`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants