yeah, it's an optimizing source to source compiler ("transpiler") if you want to be precise. you write unmemoized React code in JS, and you get back JS code that runs faster in the React runtime.
yeah, it's an optimizing source to source compiler ("transpiler") if you want to be precise. you write unmemoized React code in JS, and you get back JS code that runs faster in the React runtime.
thanks for all the feedback previously! just landed it: bsky.app/profile/no.l...
if you have more feedback, please let me know and I'll take a look
thanks Dan! just landed it: bsky.app/profile/no.l...
thanks Naman! just landed it: bsky.app/profile/no.l...
If you have more feedback on the docs, please share it here in this thread and I'll take a look!
And we now also have a dedicated section for Library authors on how to use React Compiler to ship pre-optimized code to your users.
react.dev/reference/re...
We've also documented how to use the "use memo" and "use no memo" directives to opt-in or out components/hooks from React Compiler. In rare cases where your app breaks after being compiled, these directives help you move forward.
react.dev/reference/re...
React Compiler is designed to work best with the default settings (no configuration!), but if you have a special need, we now have them documented.
react.dev/reference/re...
the new Learn pages for React Compiler are now better organized, and have new sections on incremental adoption and debugging.
react.dev/learn/react-...
screenshot of new React Compiler docs. you can see the actual docs here: https://react.dev/learn/react-compiler
new React Compiler docs have landed! thank you everyone for the feedback.
react.dev/learn/react-...
fair point! i can add a link to the blog post at least
lol yeah it was intentional to subtly show how easy it is to get wrong. I agree though on slimming the code example down to more clearly make the point. Thanks for the feedback!
glad it was useful! I wrote about the other integrations here: react-dev-git-pr7868-fbopensource.vercel.app/learn/react-...
so overall the performance improvements outweighed any regressions from having a slightly bigger bundle.
What we've generally found is that the bundle-size increase is quite small after gzip. We also saw that it wasn't just re-renders that got faster but also initial load, as often times components have to render multiple times even on the very first page load in order to fully settle.
we shared some numbers previously: react.dev/blog/2024/10...
I'm not sure if we want to put this in the docs as I don't want to make any claims about how much the compiler can improve your app. It's really going to vary based on how your app was built and where your performance bottlenecks are.
@ayc0.github.io I added a bullet to the React.memo reference: react-dev-git-pr7868-fbopensource.vercel.app/reference/re...
does this help?
thanks for sharing! let me think about how to best explain this in the docs.
"use {no} forget" still works for now, but "use {no} memo" is what we wanted to go with in the long term since "Forget" is more of an internal codename for the compiler
i've started on a rewrite of the React Compiler docs thanks to the feedback from this thread: bsky.app/profile/nmn....
i want to make our compiler docs really great before the stable release, so i would love to hear more feedback!
github.com/reactjs/reac...
@rossipedia.com @danabra.mov i took into account all the comments in the thread in a rewrite: github.com/reactjs/reac...
would love to hear your thoughts on the PR and if there's anything else we can add to make the docs better!
thanks for the feedback! i took into account all the comments in the thread in a rewrite: github.com/reactjs/reac...
would love to hear your thoughts on the PR and if there's anything else we can add to make the docs better.
thanks for the feedback! our goal with configuring the compiler is that ideally, you shouldn't need to. that's why we downplayed the config options a lot in the docs, but i can see how that's unclear and makes it look like we don't care. i'll send some PRs to fix this!
yeah I added a tool that lets the LLM search the React docs directly too, and we're experimenting with some other ideas too to help steer it in a better direction
not yet, but if you clone the repo you can build and try it locally via yarn dev
github.com/facebook/rea...
‘Anki’라는 앱으로 카드를 만들거든요. 한국어 선생님은 italki에서 찾았어요
Yes, it is based on LSP. However there will be a small number of features that require specific editor support since LSP does not cover some features. For example, if we wanted to show compiler output in a secondary window, that would be VSCode only for now.
hello we released RC RC
update:
this weekend marks 5 years I've spent at Meta. the longest I've been in one co. it's been long enough that i am getting pretty curious about what else might be out there. mission-driven teams with high agency, great people, no bureaucracy, extreme clarity. does this exist 👀