Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Component should be written as a pure function

// Add constructor() like:
exports class myComponent extends React.Component {
  constructor(props) {
    super(props);
    this.state = {};
  }
  render() {
    return (
      <div>Hello</div>
    );
  }
}
 
PREVIOUS NEXT
Tagged: #Component #written #pure #function
ADD COMMENT
Topic
Name
2+5 =