File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -25,17 +25,18 @@ export default function scuttlebutt(options) {
25
25
return ( createStore ) => {
26
26
// is it more efficient to store previous states, or replay a bunch of
27
27
// previous actions? (until we have COMMIT checkpointing, the former)
28
- const scuttlebutt = connectGossip (
29
- new Dispatcher ( options . dispatcherOptions ) ,
28
+ const dispatcher = new Dispatcher ( options . dispatcherOptions ) ,
29
+ scuttlebutt = connectGossip (
30
+ dispatcher ,
30
31
options . uri ,
31
32
options . primusOptions ,
32
33
options . primus
33
34
)
34
35
35
- return ( reducer , preloadedState , enhancer ) => {
36
+ return ( reducer , initialState , enhancer ) => {
36
37
const store = createStore (
37
38
scuttlebutt . wrapReducer ( reducer ) ,
38
- [ [ , , preloadedState ] ] , // preloaded state is the earliest snapshot
39
+ dispatcher . wrapInitialState ( initialState ) , // preloaded state is the earliest snapshot
39
40
enhancer )
40
41
41
42
return {
You can’t perform that action at this time.
0 commit comments