Skip to content

Cant use it as es6 component #16

@erezLieberman

Description

@erezLieberman

i try to use is in es6 component and my code looks like this:
class TestComponent extends Component{

constructor(props) {
super(props);

this.displayName = 'TestComponent';
this.mixins = [LocalStorageMixin];

this.state = {
  counter:0,
};

this.onClick = this.onClick.bind(this);

}

onClick() {
this.setState({
counter: this.state.counter + 1}
);
}

render() {
return (
{this.state.counter}
);
}
};

but the state dont stay when i refrash the page... - note that if i use is at regular createclass thats work...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions