Joe Savona's Avatar

Joe Savona

@en-js.bsky.social

React team at Meta

1,042 Followers  |  53 Following  |  77 Posts  |  Joined: 30.05.2023  |  2.2925

Latest posts by en-js.bsky.social on Bluesky

The description: β€œThis PR adds <feature> and unit tests. <lengthy description saying the same thing 3 times in different ways>”

The diff: changes to one (1) file completely unrelated to the feature, no tests, and the only change is to *undo the prettier formatting of that one file*.

02.08.2025 16:50 β€” πŸ‘ 30    πŸ” 0    πŸ’¬ 3    πŸ“Œ 0

Are you running the latest linter? I’m surprised you’re getting rules of hooks violations if your LLM can see the linter errors. What’s your setup like?

23.07.2025 04:01 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

RC uses a control flow graph and SSA form, and does static analysis incl type inference, constant folding, dead code elimination, escape analysis, etc. I’m not aware of any other tool that does this degree of low-level analysis+optimization that isn’t referred to as a compiler.

22.07.2025 02:10 β€” πŸ‘ 12    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Was the build already using Babel? I’m wondering if the hit was simply from adding the plugin or whether it was bc it triggered switching from a faster build toolchain.

17.07.2025 04:27 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Preview
React Compiler – React The library for web and native user interfaces

Can you give this a try? react.dev/learn/react-...

12.07.2025 20:47 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

The compiler now powers eslint-plugin-react-hooks. The specific validation (for setState in the top level of use effect) isn’t enabled by default yet, but we’ll turn it on before stable.

10.07.2025 05:16 β€” πŸ‘ 4    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

React Compiler in fact does already have a lint rule against this.

People can intentionally write bad code in any framework. You can do the exact same anti-pattern in any React competitor.

10.07.2025 04:33 β€” πŸ‘ 3    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

It certainly can be done, but there’s no precedent for this in the ecosystem. ESLint, TypeScript, Flow, etc will report errors but never prevent you from running your code. The only thing that can really get in the way of that is a syntax error, which is a low bar.

07.07.2025 03:57 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

Gotcha. That all makes sense with the extra context!

28.06.2025 01:04 β€” πŸ‘ 3    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Basically, whether you ship compiled code or not is purely an implementation detail to your users. You could have done all that memoization manually! As long as you’ve tested and are confident, why not ship as the default?

27.06.2025 03:50 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

I don’t quite get why you’d do that, but it doesn’t seem harmful so πŸ€·β€β™‚οΈ

27.06.2025 03:49 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

Yeah, bundling in the compiler runtime is the right call for now. It’s small and as you noted in replies, it’s designed as a polyfill.

26.06.2025 01:15 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

I overestimated the number of people who’d be working today lol. Will follow up early next week. But in general, I would recommend waiting to ship a precompiled stable release until we have a stable runtime version to depend on.

20.06.2025 17:14 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 1

We are all off today, but I’ll sync w the team and report back tomorrow

19.06.2025 15:43 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

Anything we can do to support? I somehow missed that WG post, not sure if those questions are still relevant

18.06.2025 22:53 β€” πŸ‘ 4    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

We try to attend a bunch of them, I think schedules just didn’t work out for this one πŸ€·β€β™‚οΈ

18.06.2025 18:07 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

1) us too!
2) over a year ago we started internally using a TC39-inspired staging system for features. We publicly share what’s in dev (labs posts), canary, and stable.
3) we agree! We’ve tried multiple approaches to working groups w mixed success and we’ll keep iterating

17.06.2025 21:55 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

Sorry to hear it didn’t work out for you! What are the main libraries you’re using for state management and data loading? Maybe a library was incompatible

17.06.2025 21:52 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

This is a good question. We have been in the fence about whether and how to surface these cases, because it’s not necessarily a problem. You already have memoization. Im curious for what would you’d find helpful here

14.06.2025 17:24 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

We might be missing a declaration for sort too. I know we have map/filter and a few others. If you want to contribute look for those methods in ObjectShape.ts and add the missing ones! :-)

14.06.2025 17:12 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 2    πŸ“Œ 0

Yes but not for that example. There, it’s bailing out bc we are missing a declaration for `Array.proto.toSorted` so we don’t realize it returns an array, and therefore don’t know that the later .map call isn’t mutating

14.06.2025 16:43 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

@gsathya.bsky.social this formalizes the previous Store/Capture semantic we came up w, and allows us to infer precise effects across function expression boundaries

14.06.2025 16:22 β€” πŸ‘ 3    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

I think there’s probably an element where if you’re sharing historical context you want multiple perspectives, and a single person’s written account of a complex thing just isn’t enough. Good history books and documentaries account for this.

14.06.2025 15:58 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Really appreciate the kind words. Re the first half: I have worked on 3-4 systems that at runtime do incremental computation (of which signals are a variant), and use advanced compilation to provide a β€œplain-value” API w no explicit reactive values. Compilation is a super power, full stop.

14.06.2025 04:08 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

WIP writeup of the core inference rules that power React Compiler (coinciding w rewriting the guts of this algorithm to be more consistent, precise and powerful, especially for function expressions)

github.com/facebook/rea...

14.06.2025 00:52 β€” πŸ‘ 26    πŸ” 2    πŸ’¬ 2    πŸ“Œ 0

For a year+ we’ve been following a staging system inspired by TC39 for React development. It’s a great model. We don’t publish precise details on early stages, but focus on communicating what’s in dev (labs posts), canary, and stable.

13.06.2025 20:20 β€” πŸ‘ 6    πŸ” 1    πŸ’¬ 0    πŸ“Œ 0

If you call a hook on first render, then don’t call it in the next render, then call it again in 3rd render, does its state reset or not? Both answers make sense and whichever default you pick will confuse some users.

12.06.2025 04:06 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

bsky.app/profile/en-j...

We may explore conditional hooks at some point but not imminently. We weren’t blocked on the compiler to support them, it’s a question of design and footguns.

11.06.2025 04:42 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

Build performance is definitely something we’re watching out for, and the most practical path is to statically compile a modified version of the current code with Static Hermes. Minus the very thin Babel frontend, since the core logic is decoupled from Babel.

09.06.2025 00:08 β€” πŸ‘ 6    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

Vercel folks already contributed an integration that uses an embedded JS engine to run the compiler within SWC. Definitely has perf overhead though.

08.06.2025 23:57 β€” πŸ‘ 7    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

@en-js is following 20 prominent accounts