createStore
const { useStore, dispatch, query, fetch } = createStore({
state: {},
reducers: {},
affects: {},
})interface State {
count: number
step?: number
}
const initialState: State = { count: 0 } as State
const someStore = createStore({ state: initialState })const someStore = createStore({
reducers: {
increment(state, step) {
state.count += step
},
},
})Last updated
Was this helpful?