Skip to main content

Examples

info

All examples were built using create-vite. Once you clone the repository, simply install the dependencies and run the "dev" script (e.g. yarn dev) from the example's root directory.

The following examples are available:

  1. atom-effects - initialize and persist atom values using localStorage.
  2. asynchronous-state - build a deeply nested, asynchronous state graph.
  3. error-handling - see how rejected promises are handled.
  4. complex-state - level up with multiple dependencies.
  5. caching - apply cache policies to optimize network traffic.
  6. aborting-work - abort work with Stan-provided AbortSignal.
  7. dynamic-dependencies - watch a dynamic state graph in action.
  8. switching-stores - reset all state by switching stores.
  9. react-suspense - use React Suspense with Stan.
  10. vanilla - use vanilla Stan if you really have to.