Using the React Compiler in the Preact project #4640
ndt080
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, people. I decide to create this discussion for developers, who want to setup the React Compiler in their Preact projects.
I haven't tested this in the project with @preact/signals, but it works successfull in a general project.
My dependencies:
Vite configuration
Experience
I used the compiler in a heavy project. There are no problems, but the performance differs depending on the compiler's target parameter difference. I've got a grid with heavy rows and cells that uses virtualization. When I used the target 19, the performance was little bit lower when scrolling. I also had to add the "use no memo" directive in the component where I used cloneElement. It still works, but when using "use no memo" the performance is higher. I think these are not Preact problems, but the specifics of using the compiler in an non-general logic/components.
If you have used the compiler in a project with signals or you had a different experience, please describe it.
Beta Was this translation helpful? Give feedback.
All reactions