new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

React · API reference · all subjects

advanced hooks

5 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

useTransition hook

useTransition is a Hook to start transitions, including a value to track the pending state. It allows marking some state updates as not urgent while other state updates are considered urgent by default. See the official docs for the complete signature and usage.

useDeferredValue hook

useDeferredValue lets you defer re-rendering a non-urgent part of the tree. It is similar to debouncing but has advantages compared to it: there is no fixed time delay, so React will attempt the deferred render right after the first render is reflected on the screen. The deferred render is interruptible and does not block user input.

useSyncExternalStore hook

useSyncExternalStore is a new Hook that allows external stores to support concurrent reads by forcing updates to the store to be synchronous. It removes the need for useEffect when implementing subscriptions to external data sources. This Hook is intended to be used by libraries, not application code.

useSyncExternalStore for external store integration

useSyncExternalStore is a new Hook in React 18 that allows external stores to support concurrent reads by forcing updates to the store to be synchronous. It is recommended for any library that integrates with state external to React. This API is needed to support React 18's concurrent rendering.

useInsertionEffect for CSS-in-JS libraries

useInsertionEffect is a new Hook in React 18 designed for CSS-in-JS libraries. It runs after the DOM is mutated but before layout effects read the new layout. This solves performance issues of injecting styles in render. Most applications should not use this Hook directly.

Give your agent this brain