React hooks & the closure hell 2
Since event handlers are closures we need to either re-create them on each render or whenever one of it's dependencies changes. This means components that only depend on the event handler (and possibly not on the handler's dependencies) will have to re-render too.
Tags: react, reacthooks, javascript, frontend