The alternative would be to write a side effect inside your `render()` function, which is illegal -- it breaks the new Concurrent mode rendering, which can call render() speculatively.
I mean, I see why it's intuitively unappealing to you, but there are perfectly good reasons for the design.
I mean, I see why it's intuitively unappealing to you, but there are perfectly good reasons for the design.