Skip to content

ThomasBurleson/app-store-rsm-react

Repository files navigation

React + Zustand

Visually this SPA is NOT exciting!

Instead, the focus is on the implmentation of Zustand reactive stores within a React application.

App-Store

The store itself is implemented with Zustand and middleware.

Middleware is used for devTools, persistence, and computed properties.

  • Changes to store state will trigger hooks to remit
    • Supported for both SSR and CSR
    • Selectors will optimize when state changes trigger UI re-renders
  • Bi-directional sync to URL (for bookmarks)
  • Zustand Middleware:
    • Persists to localstorage
    • Immutable store using ImmerJS
    • Support for Redux Dev Tools

UI Components

image


Zustand Store

image