Skip to content

Conversation

poteto
Copy link
Member

@poteto poteto commented Oct 9, 2025

Updates our blog posts and docs for React Compiler 1.0

Copy link

github-actions bot commented Oct 9, 2025

Size changes

📦 Next.js Bundle Analysis for react-dev

This analysis was generated by the Next.js Bundle Analysis action. 🤖

Five Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load
/404 128.11 KB (🟡 +6 B) 238.65 KB
/500 128.12 KB (🟡 +6 B) 238.66 KB
/[[...markdownPath]] 130.55 KB (-5 B) 241.09 KB
/errors 128.36 KB (🟡 +6 B) 238.9 KB
/errors/[errorCode] 128.34 KB (🟡 +6 B) 238.88 KB
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

Next to the size is how much the size has increased or decreased compared with the base branch of this PR. If this percentage has increased by 10% or more, there will be a red status indicator applied, indicating that special attention should be given to this.

### React Compiler is now stable! {/*react-compiler-is-now-in-rc*/}

Please see the [RC blog post](/blog/2025/04/21/react-compiler-rc) for details.
Please see the [stable release blog post](/blog/2025/10/08/react-compiler-1) for details.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love that we’re updating our old blog posts to help developers avoid outdated information.

That said it’s really important to not break links, and not rewrite history. So here and in other places, let’s keep the existing text and add an update about the stable release. Strikethrough text for what was there works too, but let’s not rewrite so aggressively.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@josephsavona I added a redirect in vercel.json, and I also added a deadlink checking script a while back to make sure we have no deadlinks. We did the same thing (rewrite the RC post) for React 19 RC to React 19. I can do a separate one instead but thought we'd keep the tradition

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh ok, that's cool

Copy link
Member

@josephsavona josephsavona left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comment, let’s avoid breaking links and rewriting history

Copy link
Member

@josephsavona josephsavona left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I misunderstood, this looks great. I left a few small suggestions but i don't think they're blocking, we could ship and iterate. Thank you for following up on this!

### React Compiler is now stable! {/*react-compiler-is-now-in-rc*/}

Please see the [RC blog post](/blog/2025/04/21/react-compiler-rc) for details.
Please see the [stable release blog post](/blog/2025/10/08/react-compiler-1) for details.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh ok, that's cool

{`yarn add --dev --exact babel-plugin-react-compiler@latest`}
</TerminalBlock>

As part of the stable release, we've been making React Compiler easier to add to your projects and added optimizations to how the compiler generates memoization. React Compiler now supports optional chains and array indices as dependencies. We're exploring how to infer even more dependencies like equality checks and string interpolation. These improvements ultimately result in fewer re-renders and more responsive UIs, while letting you keep writing idiomatic declarative code.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're exploring how to infer even more dependencies like equality checks and string interpolation. These improvements ultimately result in fewer re-renders and more responsive UIs, while letting you keep writing idiomatic declarative code.

I am confident we can pull this off based on @mofeiZ's explorations, but i think we can leave this off for now. Let's talk about it when it's ready. It's easy for developers to misread this and think these optimizations are ready now (think about how everyone thought that 19 included the compiler even though we didn't say that)

In other words, changing memoization may under rare circumstances cause unexpected behavior. For this reason, we recommend following the Rules of React and employing continuous end-to-end testing of your app so you can upgrade the compiler with confidence and identify any rules of React violations that might cause issues.

If you don't have good test coverage, we recommend pinning the compiler to an exact version (eg `1.0.0`) rather than a SemVer range (eg `^1.0.0`). You can do this by passing the `--save-exact` (npm/pnpm) or `--exact` flags (yarn) when upgrading the compiler. You should then do any upgrades of the compiler manually, taking care to check that your app still works as expected.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we include an answer to "can i delete my useMemo/useCallback" here? the answer can be in the docs, but it might be worth linking to it from the blog post to get more attention to how the compiler treats these hooks now

Updates our blog posts and docs for React Compiler 1.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants