- GlobalState — An object that holds and manages the global state content.
- SsrContext — Holds data persistent across multiple SSR (server-side rendering) iterations.
- newAsyncDataEnvelope — Creates a new plain JS object, satisfying the AsyncDataEnvelopeT type, and with reasonable initial values of its fields.
- withGlobalStateType — Returns a set of library components, classes, and hooks "locked-in" onto a specified state type. Thus, making it unnecessary (in TypeScript) to pass the state type as a generic parameter for each component, class, and hook, when they are used, and allowing TypeScript compiler to auto-evaluate their other generic parameters in many cases.
- REACT_GLOBAL_STATE_DEBUG — Enables debug logging.
- getGlobalState() — Gets GlobalState instance from the context.
- getSsrContext() — Gets SsrContext object (the server-side rendering context, which is used to pass global-state-related data between rendering iterations).
- useAsyncCollection() — Resolves and stores at the given path of global state elements of an asynchronous data collection.
- useAsyncData() — Resolves asynchronous data, and stores them at the given path of global state.
- useGlobalState() — The primary hook for interacting with the global state, modeled after the standard React's useState().
- AsyncCollectionLoaderT — The signature of a valid data loader function for useAsyncCollection() hook.
- AsyncDataEnvelopeT — The type of a state segment storing data managed by useAsyncData() and useAsyncCollection() hooks, alongside related meta-data.
- AsyncDataLoaderT — The signature of a valid data loader function for useAsyncData() hook.
- ForceT — A special type for «unlocking» overloads of hooks and functions that allow to enforce arbitrary value types.
- SetterT — The type of setter returned by the useGlobalState() hook.
- UseAsyncDataOptionsT — The type of options object accepted by useAsyncData() and useAsyncCollection() hooks.
- UseAsyncDataResT — The type of result returned by useAsyncData() and useAsyncCollection() hooks.
- UseGlobalStateResT — The type of result returned by the useGlobalState() hook.
- ValueOrInitializerT — The type for arguments that accept either a value to use, or a function that returns the value to use.