📌

(WIP)React18について

2021/12/27に公開

めっちゃ簡単に始められる

大きな

startTransition: lets you keep the UI responsive during an expensive state transition.
コストのかかる状態遷移の間、UIの応答性を維持することができる

useDeferredValue: lets you defer updating the less important parts of the screen.
画面上の重要でない部分の更新を延期することができる

SuspenseList: lets you coordinate the order in which the loading indicators appear.
ローディングインジケーターの表示順を調整することができる

concurrent


Badging

useStateで複数のstateをアップデートしたときに各stateの更新ごとにrenderがはしってしまう

// React will only re-render once at the end (that's batching!)

startTransition
重い処理の
https://react-fractals-git-react-18-swizec.vercel.app/

Reconciliation
https://ja.reactjs.org/docs/codebase-overview.html#reconcilers

その他にもあるかも

useSyncExternalStore
useId
useInsertionEffect

Discussion