AndrewWalsh/react-persist-store

View on GitHub
demo/src/store.ts

Summary

Maintainability
A
0 mins
Test Coverage
import createStore from "react-persist-store";

const documentStore = {
  app: {
    count: 1,
    text: "Odd",
    unchanged: [],
  },
  const: {
    a: 1,
  },
};

const store = createStore(documentStore, {
  storage: "session",
  namespace: "namespace",
});

export const useApp = store("app");