Michael J. Ryan
1 min readNov 18, 2019

--

I agree… I think in those cases, you could still wrap with useCallback against the dependency… I’d considered having access to the dependencies in my functions.

const doSomething = (deps) => (…)=> ACTION

Where the wrapper first passes the dependencies to each and returns the wrapped actions from there. It’s a pretty simple module as-is, but could do a different version that adds a layer for passing dependencies down.

--

--

Michael J. Ryan
Michael J. Ryan

Written by Michael J. Ryan

Food nerd (keto, omad, carnivore) — Programmer and JavaScript junkie! (node.js, mongodb, browser)

No responses yet