-
-
Notifications
You must be signed in to change notification settings - Fork 134
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
Add support for React Compiler #853
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
Accordingly, update the React documentation. reactjs/react.dev#7133 |
We don't do this at least for now. Now, may I ask you to add |
Now, I wonder how you made it work without "annotation". 🤔 |
Background: #853 --------- Co-authored-by: Daishi Kato <dai-shi@users.noreply.github.com>
Background: dai-shi/waku#853 --------- Co-authored-by: Daishi Kato <dai-shi@users.noreply.github.com>
Background: dai-shi/waku#853 --------- Co-authored-by: Daishi Kato <dai-shi@users.noreply.github.com>
Now the users can enable the react compiler by adding a new field
reactCompiler: true
in thewaku.config.ts
file.Let's take a look at the effects before and after enabling react compiler optimization.
When the Child component re-renders, it will console "render".
before enabling the react compiler:
![20240828231420_rec_](https://private-user-images.githubusercontent.com/68707557/362348369-141f408b-3a27-4388-b7be-4186a103b06f.gif?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NDAwNTczODgsIm5iZiI6MTc0MDA1NzA4OCwicGF0aCI6Ii82ODcwNzU1Ny8zNjIzNDgzNjktMTQxZjQwOGItM2EyNy00Mzg4LWI3YmUtNDE4NmExMDNiMDZmLmdpZj9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMjAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjIwVDEzMTEyOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTM5MWVmN2EwMmZjYjZhNTkzMDE3OGE0YTMyZWI5Nzk2YzBlOTk1MDE4NjcwZmQzNDdhZDIyOWI3MmI0NmRmNDgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.dNMkWQGNkAMfvDENA_cKL_GWGFgMoBgyl20UByHz8c0)
after enabling the react compiler:
![20240828230748_rec_](https://private-user-images.githubusercontent.com/68707557/362346029-8a65ba71-119e-4409-9d62-d154b5557628.gif?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NDAwNTczODgsIm5iZiI6MTc0MDA1NzA4OCwicGF0aCI6Ii82ODcwNzU1Ny8zNjIzNDYwMjktOGE2NWJhNzEtMTE5ZS00NDA5LTlkNjItZDE1NGI1NTU3NjI4LmdpZj9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMjAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjIwVDEzMTEyOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWU4MDY5MjA3ODI4YTc2NmI2YzE5MjQyNjIxYzQ3MWNjN2Q4YTg5MWM5YTEyYTQzNTNlYzczZDk1YjAzOTNjZjQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.baZCr48YmUPOWJ0xx25F0wNfHxUG_gd4x-pAJZXTkcw)