James Wright
1 min readFeb 18, 2019

--

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.

--

--

James Wright
James Wright

Written by James Wright

Software engineer, writer, speaker, and open source contributor. Worked at the likes of Matillion, Sky, Channel 4, Trainline.

No responses yet