This survey closed on November 15, 2023. View Survey Results »

useCallback is a React Hook that lets you cache a function definition between re-renders.
jsx
const cachedFn = useCallback(fn, dependencies)
Tell us more:
Tell us more:
Tell us more:

useContext is a React Hook that lets you read and subscribe to context from your component.
jsx
const value = useContext(SomeContext)
Tell us more:
Tell us more:
Tell us more:

useDeferredValue is a React Hook that lets you defer updating a part of the UI.
jsx
const deferredValue = useDeferredValue(value)
Tell us more:
Tell us more:
Tell us more:

useEffect is a React Hook that lets you synchronize a component with an external system.
jsx
useEffect(setup, dependencies?)
Tell us more:
Tell us more:
Tell us more:

useId is a React Hook for generating unique IDs that can be passed to accessibility attributes.
jsx
const id = useId()
Tell us more:
Tell us more:
Tell us more:

useMemo is a React Hook that lets you cache the result of a calculation between re-renders.
jsx
const cachedValue = useMemo(calculateValue, dependencies)
Tell us more:
Tell us more:
Tell us more:

useReducer is a React Hook that lets you add a reducer to your component.
jsx
const [state, dispatch] = useReducer(reducer, initialArg, init?)
Tell us more:
Tell us more:
Tell us more:

useRef is a React Hook that lets you reference a value that’s not needed for rendering.
jsx
const ref = useRef(initialValue)
Tell us more:
Tell us more:
Tell us more:

useState is a React Hook that lets you add a state variable to your component.
jsx
const [state, setState] = useState(initialState);
Tell us more:
Tell us more:
Tell us more:

useSyncExternalStore is a React Hook that lets you subscribe to an external store.
jsx
const snapshot = useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot?)
Tell us more:
Tell us more:
Tell us more:

State of React 2023