Although, when I see code snippets on the internet I always wonder how do people test this.
The fact that dependencies are declared as imports and all the logic is inside the component function, it feels like you have to shuffle things around just to make the thing runnable outside of React.