Post
the other nuance is that if the function changes, we will disconnect and reconnect on render (like a function dep in an effect). we need to do this because if you reference props, you need the new prop value. so you need a module level function if no props (like you have) or useCallback.
0 reposts6 likes
Yah, I appreciated @tkdodo.eu’s mention of this in his blog. I’d love to say this shouldn’t make a huge difference in app code but…I’ve seen app code