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

Store#clear does not set initial state from ES6 class constructor #356

Closed
oyvinmar opened this issue Jul 2, 2015 · 1 comment
Closed

Comments

@oyvinmar
Copy link

oyvinmar commented Jul 2, 2015

When I set the initial state via ES6 class constructor:

class MyStore extends Marty.Store {
  constructor(...args) {
    super(...args);
    this.state = new Immutable.List();
  }
}

And then call Store#clear() the state is set to the default getInitalState() and not new Immutable.List. I'm currently using getInitialState in my ES6 classes as workaround.

@taion
Copy link
Member

taion commented Jul 2, 2015

Duplicate of martyjs/marty-lib#24. Going to close this issue in favor of that one, because it has more discussion on it already.

@taion taion closed this as completed Jul 2, 2015
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

2 participants