repos / starfx

a micro-mvc framework for react apps
git clone https://github.com/neurosnap/starfx.git

starfx / examples / tests-rtl / src
Eric Bower  ·  2025-06-06

store.ts

 1import { api, initialState as schemaInitialState } from "./api";
 2import { createStore } from "starfx";
 3
 4export function setupStore({ initialState = {} }) {
 5  const store = createStore({
 6    initialState: {
 7      ...schemaInitialState,
 8      ...initialState,
 9    },
10  });
11
12  store.run(api.register);
13
14  return store;
15}