Today we're sharing that View Transitions and Activity are ready to try in the experimental channel, along with docs and updates on other areas we're actively working on:
react.dev/blog/2025/04...
@gsathya.bsky.social
react at meta formerly: v8/chrome at google π recompiled.dev
Today we're sharing that View Transitions and Activity are ready to try in the experimental channel, along with docs and updates on other areas we're actively working on:
react.dev/blog/2025/04...
for perf reasons
github.com/facebook/rea...
Today, weβre deprecating Create React App for new apps, and encouraging existing apps to migrate to a framework.
Weβre also providing docs for when a framework isnβt a good fit for your project, or you prefer to start by building a framework.
react.dev/blog/2025/02...
Implemented, evaluated and deleted already
github.com/facebook/rea...
ugh so sorry to hear that :(
09.12.2024 03:43 β π 1 π 0 π¬ 0 π 0Ref Callbacks got an upgrade with React 19, and the presence of the React Compiler has further changed my thinking about using useCallback for those in some situations.
tkdodo.eu/blog/ref-cal...
Thank you @gsathya.bsky.social for starting the discussion about this πββοΈ
new project with React 19
Let's go! π
07.12.2024 19:09 β π 4 π 1 π¬ 1 π 1yeah _pure_ isn't correct, it's more about the captured context -- the compiler moves functions that don't capture any values created in render
07.12.2024 16:03 β π 2 π 0 π¬ 1 π 0cc @ricky.fm
07.12.2024 05:15 β π 3 π 0 π¬ 0 π 0add me!
27.11.2024 02:22 β π 1 π 0 π¬ 1 π 0donβt useEffect, but if you must, donβt call setState in it
23.11.2024 16:20 β π 210 π 29 π¬ 17 π 5I got to speak wearing a traditional Tamil veshti!
23.11.2024 12:22 β π 32 π 0 π¬ 0 π 0so bummed that they've stopped archiving now :(
22.11.2024 14:22 β π 1 π 0 π¬ 0 π 0Don't use memoization for correctness, use it only for perf!
22.11.2024 14:08 β π 15 π 1 π¬ 1 π 0it's too early to share anything concrete as everything could change, but we're thinking deeply about effects!
22.11.2024 14:07 β π 7 π 0 π¬ 2 π 0no you should write it! I always learn something new from your posts
22.11.2024 14:07 β π 1 π 0 π¬ 1 π 0i agree! we're already working on something to make this easier ;)
22.11.2024 13:04 β π 3 π 0 π¬ 1 π 0yes that'd be awesome! :)
22.11.2024 12:58 β π 1 π 0 π¬ 1 π 0Yes exactly!
22.11.2024 12:46 β π 4 π 0 π¬ 1 π 0in the long term, we want to move away from manual memoization in react and would like to remove these APIs
22.11.2024 12:46 β π 1 π 0 π¬ 1 π 0this is why the compiler currently bails out on compiling a component if it's newly compiled memoization is different from the existing manual memoization
so we want folks to just use memo for optimization and then just remove all manual memo after adding the compiler
best case you delete all manual memo and it just works with the compiler because the compiler memoizes everything in the same way
but the compiler could've memoized this callback differently because of heuristics, so it may not be safe to remove this particular useCallback
Imagine you're adopting the compiler and the compiler works great on your app and you ship it. Now you want to delete the useMemo/useCallback from your code to improve dx. How do you know which ones are safe to remove?
22.11.2024 12:46 β π 11 π 0 π¬ 1 π 2you're right that the callback won't be thrown away but using memoization for correctness can cause downstream issues
22.11.2024 12:46 β π 3 π 0 π¬ 1 π 0I'd store the id in a ref and check that manually and not depend on useCallback:
```
const idRef = useRef(null);
const scroller = (node) => {
if (idRef.current === null || idRef.current !== id) {
node?.scrollIntoView({ behavior: "smooth" });
idRef.current = id;
}
};
```
Also I just realized a potential bug in the compiler after reading your post! The compiler will automatically move pure functions outside the component, which can break callback ref identity check
22.11.2024 10:32 β π 10 π 0 π¬ 1 π 1Right, I was referring to the useCallback example (I meant memoization in general, not useMemo)
22.11.2024 10:27 β π 2 π 0 π¬ 2 π 0π Had to post this a lot on the other platform lately and apparently, it blows people's mind that this is possible. I wrote it over 2 years ago, and callback refs will only get better in v19 because they will get cleanup functions. Have a read:
tkdodo.eu/blog/avoidin...
Nice post! One minor nit would be to not use memo for correctness -- you can use a ref to store a boolean and check this boolean before doing the focus instead
22.11.2024 09:51 β π 4 π 0 π¬ 1 π 0This one is special because it's happening at home in Chennai! :)
22.11.2024 09:27 β π 10 π 1 π¬ 0 π 0