Other Hooks
These Hooks are mostly useful to library authors and aren’t commonly used in the application code.
useDebugValue
lets you customize the label React DevTools displays for your custom Hook.
useId
lets a component associate a unique ID with itself. Typically used with accessibility APIs.
useSyncExternalStore
lets a component subscribe to an external store.
If you want to change selection, open document below and click on "Move attachment"
Built-in React Hooks – Reacte lets you read the value of a resource like a Promise or context. function MessageComponent({ messagePromise }) { const message = use(messagePromise); const theme = use(ThemeContext); // ... } <span>Other Hooks These Hooks are mostly useful to library authors and aren’t commonly used in the application code. useDebugValue lets you customize the label React DevTools displays for your custom Hook. useId lets a component associate a unique ID with itself. Typically used with accessibility APIs. useSyncExternalStore lets a component subscribe to an external store. Your own Hooks You can also define your own custom Hooks as JavaScript functions. PreviousOverview Nextuse How do you like these docs? Take our survey! © 2023 Learn React Quick Start In Summary
status | not read | | reprioritisations | |
---|
last reprioritisation on | | | suggested re-reading day | |
---|
started reading on | | | finished reading on | |
---|
Details