Skip to content

Commit

Permalink
Pass store state to bootstrap
Browse files Browse the repository at this point in the history
  • Loading branch information
goatslacker committed Oct 1, 2015
1 parent 01b0b76 commit b1a3f7a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/alt/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@ class Alt {
}

bootstrap(data) {
StateFunctions.setAppState(this, data, (storeInst) => {
storeInst.lifecycle('bootstrap')
StateFunctions.setAppState(this, data, (storeInst, state) => {
storeInst.lifecycle('bootstrap', state)
storeInst.emitChange()
})
}
Expand Down
2 changes: 1 addition & 1 deletion src/alt/utils/StateFunctions.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export function setAppState(instance, data, onStore) {
} else {
store.state = obj[key]
}
onStore(store)
onStore(store, store.state)
}
}, [obj])
}
Expand Down

0 comments on commit b1a3f7a

Please sign in to comment.