componentDidUpdate function only fires when the parent component re-renders causing the child to re-render.
In your case the parent isn't re-rendering at all. Its just the initial render.
To detect an initial render, you would make use of componentDidMount function. You can see the componentDidUpdate function being fired if you have a state in parent that you update based on an interaction or any other way
class Grid extends React.Component { componentDidMount(){ alert('Should Fire') } componentDidUpdate() { alert('ComponentDidUpdate Should Fire'); } render() { return (<div>{this.props.name}</div>) } } class Application extends React.Component { state = { count: 0 } render() { return ( <div> <Grid name="test-grid" /> <button onClick={()=>this.setState(prev => ({count: prev.count + 1}))}> increment</button> </div> ); } } ReactDOM.render(<Application />, document.getElementById('app'));
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/16.6.3/umd/react.production.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/16.6.3/umd/react-dom.production.min.js"></script> <div id="app"/>