File tree Expand file tree Collapse file tree 1 file changed +2
-18
lines changed
Expand file tree Collapse file tree 1 file changed +2
-18
lines changed Original file line number Diff line number Diff line change @@ -4,26 +4,10 @@ import type { StoreEnhancer } from 'redux'
44
55const { createStoreFromSource } = experimental
66
7- export type Reducer < S , A > = ( state : S , action : A ) => S
8-
9- export interface ISource < S , A > {
10- /**
11- * Returns an immutable snapshot of the current state
12- */
13- getState ( ) : S
14- /**
15- * A pure function which takes and arbitrary state and an updater/action and
16- * returns a new state.
17- *
18- * React needs this in order to generate temporary states.
19- *
20- * See: https://jordaneldredge.com/notes/react-rebasing/
21- */
22- reducer : Reducer < S , A >
23- }
7+ export type ReactStore = ReturnType < typeof createStoreFromSource < any , any > >
248
259export const addReactStore : StoreEnhancer < {
26- reactStore : ReturnType < typeof createStoreFromSource < any , any > >
10+ reactStore : ReactStore
2711} > = ( createStore ) => {
2812 return ( reducer , preloadedState ) => {
2913 const store = createStore ( reducer , preloadedState )
You can’t perform that action at this time.
0 commit comments