ReactJS lifecycle method inside a function Component
Instead of writing my components inside a class, I’d like to use the function syntax. How do I override componentDidMount, componentWillMount inside function components? Is it even possible? const grid = (props) => { console.log(props); let {skuRules} = props; const componentDidMount = () => { if(!props.fetched) { props.fetchRules(); } console.log(‘mount it!’); }; return( <Content title=”Promotions” … Read more