close
SPA patterns

use() within a Context Provider

The layout starts getCurrentUser() without awaiting and shares the Promise through context. Multiple components read it with use() from a single request, each suspending where the value is used.