Thanks for taking the time to write that !
The main reason I didn't go into it, is to keep the code under 5 lines 😅
I wanted the reader to quickly understand the idea of using HOFs with the reducer and build on it and experiment themselves.
Now they can also read/use this hook 👌
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.