const x2 = useMemo(x => x, [x]);
const x2 = useMemo(x => x, [x]);
Oh, and the docs include React Compiler Playground links so you can see the automatic memoization in action!
github.com/BellCubeDev/...
Oh, and the docs include React Compiler Playground links so you can see the automatic memoization in action!
github.com/BellCubeDev/...
React Compilerを有効にして9ヶ月が経ちました
記事では、React Compilerを約9ヶ月使用した経験を共有。
プロダクションで重大な不具合は起きていないが、refやreact-hook-form関連で意図しない挙動があり、対応が必要だった。
特にwatchやformStateはuseWatch/useFormStatusで解消。
next devとbuildで挙動が違うケースに注意が必要。
useMemoなどを書かなくて済むメリットはあるが、導入にはライブラリとの相性や検証コストの考慮を推奨している。
(204文字)
React Compilerを有効にして9ヶ月が経ちました
記事では、React Compilerを約9ヶ月使用した経験を共有。
プロダクションで重大な不具合は起きていないが、refやreact-hook-form関連で意図しない挙動があり、対応が必要だった。
特にwatchやformStateはuseWatch/useFormStatusで解消。
next devとbuildで挙動が違うケースに注意が必要。
useMemoなどを書かなくて済むメリットはあるが、導入にはライブラリとの相性や検証コストの考慮を推奨している。
(204文字)
I see many developers use useMemo and useCallback for every variable and function
This is inefficient, time-consuming, and ultimately useless most of the time
@tkdodo.eu wrote a really nice article about this
I see many developers use useMemo and useCallback for every variable and function
This is inefficient, time-consuming, and ultimately useless most of the time
@tkdodo.eu wrote a really nice article about this
We can probably also delete about 9k of `useCallback` and 5k of `useMemo` in the Sanity monorepo (if my grep counting is correct). And that's just
We can probably also delete about 9k of `useCallback` and 5k of `useMemo` in the Sanity monorepo (if my grep counting is correct). And that's just
Highly recommend the read
tkdodo.eu/blog/the-us...
Highly recommend the read
tkdodo.eu/blog/the-us...
I'm skeptical, but definitely going to try it out. Auto-memoization without manual useMemo/useCallback sounds promising.
react.dev/blog/2025/10...
I'm skeptical, but definitely going to try it out. Auto-memoization without manual useMemo/useCallback sounds promising.
react.dev/blog/2025/10...
useMemo mainly prevents re-renders by stabilizing prop references, but with immutability, that would be automatic.
@danabra.mov Am I missing something here?
useMemo mainly prevents re-renders by stabilizing prop references, but with immutability, that would be automatic.
@danabra.mov Am I missing something here?
useState
useEffect
useMemo
useCallback
useTransition
useDeferredValue
memo
useState
useEffect
useMemo
useCallback
useTransition
useDeferredValue
memo
useMemo, useCallback, memo APIsみたいに手動で制御するのが美しくないって意見
使うことなくなるのかな
react.dev/blog/2024/02...
useMemo, useCallback, memo APIsみたいに手動で制御するのが美しくないって意見
使うことなくなるのかな
react.dev/blog/2024/02...
@shrutikapoor08.bsky.social will share her insights as a React developer at Slack and walk everyone through how to optimize performance using useMemo and useCallback hooks 🪝
@shrutikapoor08.bsky.social will share her insights as a React developer at Slack and walk everyone through how to optimize performance using useMemo and useCallback hooks 🪝
UseCallbackとuseMemoの違い
UseCallbackとuseMemoの違い
✅ Wrap components with React.memo.
✅ Cache values using useMemo.
✅ Optimize functions with useCallback.
✅ Use stable keys in lists. 🆗
✅ Wrap components with React.memo.
✅ Cache values using useMemo.
✅ Optimize functions with useCallback.
✅ Use stable keys in lists. 🆗