component should be written as a pure function

Solutions on MaxInterview for component should be written as a pure function by the best coders in the world

showing results for - "component should be written as a pure function"
Maelia
21 Sep 2016
1// Add constructor() like:
2exports class myComponent extends React.Component {
3  constructor(props) {
4    super(props);
5    this.state = {};
6  }
7  render() {
8    return (
9      <div>Hello</div>
10    );
11  }
12}