Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

emitChange in bootstrap #704

Open
tuwhoo opened this issue Dec 13, 2016 · 0 comments
Open

emitChange in bootstrap #704

tuwhoo opened this issue Dec 13, 2016 · 0 comments

Comments

@tuwhoo
Copy link

tuwhoo commented Dec 13, 2016

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

bootstrap(data) {
    StateFunctions.setAppState(this, data, (storeInst, state) => {
      storeInst.lifecycle('bootstrap', state)
      storeInst.emitChange()
    })
  }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant