Have you seen the code sample on react's blog? It looks like this:
export class Counter extends React.Component {
constructor(props) {
super(props);
this.state = {count: props.initialCount};
}
tick() {
this.setState({count: this.state.count + 1});
}
render() {
return (
<div onClick={this.tick.bind(this)}>
Clicks: {this.state.count}
</div>
);
}
}
Do you know what the export
statement signifies in this context?
I tried to look it up in mdn's article, but it seems to have a different interpretation there.