Why does parent's componentDidMount gets called first, then child's?
I thought it was always the case, that first, child's
componentDidMount would be called, and then, parent's.
However, in this example: https://codesandbox.io/s/tender-jones-gpkz3
componentDidMount is called, then Child's (check the logs).
This happens after I use this in child:
export default compose( withStyles(styles), withWidth() )(Child);
Does anyone have explanation why this happens?