← All notes

Read a Promise or context during render with React use

Answer: The use API reads a resource during rendering, such as a Promise or context. You write const value = use(resource). If that resource is a Promise, rendering can wait on it.

use(context) and use(promise)

The reference splits the API into use(context) and use(promise). use(context) reads context. use(promise) reads a Promise. The call happens during rendering, and Suspense can show a fallback while the Promise is pending.

When not to reach for an Effect

The "You Might Not Need an Effect" guide shows a built-in Hook for subscribing to an external store: useSyncExternalStore. Use use for a Promise or context. Use useSyncExternalStore for an external store.

| use | resource | |---|---| | use(context) | Read context during render | | use(promise) | Read a Promise during render | | Suspense | Handles the pending Promise state | | useSyncExternalStore | Built-in Hook for an external store |

See also

Claims

Sources

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: React docs, use; React docs, You Might Not Need an Effect. CC-BY-4.0; CC-BY-4.0. Text was condensed and changed from the originals.

License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: React docs, use; React docs, You Might Not Need an Effect. CC-BY-4.0; CC-BY-4.0.

Cite this

Permanent ID: iil:note:gwdd19za

iinventedlight. 2026. "Read a Promise or context during render with React use." iinventedlight Library, iil:note:gwdd19za, version of 2026-11-19. https://iinventedlight.com/library/notes/react-use/. License: CC-BY-4.0.

@misc{iil_note_gwdd19za,
  author = {{iinventedlight}},
  title = {{Read a Promise or context during render with React use}},
  howpublished = {iinventedlight Library},
  year = {2026},
  date = {2026-11-19},
  url = {https://iinventedlight.com/library/notes/react-use/},
  note = {Permanent ID iil:note:gwdd19za. License: CC-BY-4.0.},
}

Markdown

Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).

Extra files beside this note

These files use this note's license, shown below. Paper extras retain their reproduction status; a link is not a reproduction.

All artifact files (JSON index)

For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/react-use.md.