emitChange in bootstrap
- Dominant language
- JavaScript
- Stars
- 3.4k
- Forks
- 312
- PR merge metrics
- No merged PRs in 30d
Description
As you can see in docs
> Bootstrapping can be done as many times as you wish, but it is common to use when initializing your application. The alt.bootstrap() function takes in a snapshot (JSON string) you've saved and reloads all the state with that snapshot, **no events will be emitted** to your components during this process, so again, it's best to do this on init before the view has even rendered. If you need to emit a change event, you can use this.emitChange inside of your bootstrap life cycle method.
But in code I see
```js
bootstrap(data) {
StateFunctions.setAppState(this, data, (storeInst, state) => {
storeInst.lifecycle('bootstrap', state)
storeInst.emitChange()
})
}
```
Contributor guide
Assessment
This issue has not been assessed yet.