The React team recently (03/29/2022) released its latest version – version 18.0, and it brings some intriguing new things. These include Concurrent React, Transitions, … and new hooks!

Automatic Batching

Batching is when React groups multiple state updates into a single re-render for better performance. 

USEID HOOK

useId is a new hook for generating unique IDs on both the client and server, while avoiding hydration mismatches

USETRANSITION HOOK

useTransition and startTransition let you mark some state updates as not urgent. Other state updates are considered urgent by default.

useSyncExternalStore

useSyncExternalStore is a new hook that allows external stores to support concurrent reads by forcing updates to the store to be synchronous.

USEINTERTIONEFFECT HOOK

useInsertionEffect is a new hook that allows CSS-in-JS libraries to address performance issues of injecting styles in render. 

react 18

Leave a comment

Your email address will not be published.