Hey Nerman,
Thanks for sharing your thoughts! You’re certainly correct, but given how I use partial application to pass the latest state
to any thunks my augmented dispatch may receive as an input, I technically have to create a new dispatch on each re-render. My approach was the simplest I could write, given the aim of my article was to explore Hooks and context, but you’re completely right; it’s far from the most performant approach!
I haven’t really considered how I can fix this aspect, but perhaps a cheaper way of directly requesting the latest state within my augmented dispatch could help.