diff --git a/src/alt/index.js b/src/alt/index.js index d1ccde03..2ef48902 100644 --- a/src/alt/index.js +++ b/src/alt/index.js @@ -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() }) } diff --git a/src/alt/utils/StateFunctions.js b/src/alt/utils/StateFunctions.js index 32ecf23e..3c7b7b9d 100644 --- a/src/alt/utils/StateFunctions.js +++ b/src/alt/utils/StateFunctions.js @@ -14,7 +14,7 @@ export function setAppState(instance, data, onStore) { } else { store.state = obj[key] } - onStore(store) + onStore(store, store.state) } }, [obj]) }