This is a great technique! Thanks for sharing it!
The one caveat I have is comparing the initial, pre-state-setting effect run to componentWillMount. componentWillMount is called before render, before the DOM is present. The initial effect run is still called after the initial render and state initialization, like componentDidMount.
The difference is that your use case is for when you want to track state changes after the initial render. It’s a totally valid use case, and your solution nails it, but it’s different from the use case of replicating componentDidMount.
It might be helpful to reword this distinction to avoid confusion.