class App extends React.Component {
state = {
foo: false,
};
componentDidMount() {
console.log('componentDidMount() lifecycle');
// Trigger update
this.setState({ foo: !this.state.foo });
}
render() {
console.log('Render lifecycle')
return <h1>Hello</h1>
}
}