kentcdodds / use-deep-compare-effect

🐋 It's react's useEffect hook, except using deep comparison on the inputs, not reference equality
https://npm.im/use-deep-compare-effect
MIT License
1.88k stars 84 forks source link

useEffect should be used to set ref.current for concurrent mode #25

Closed landvibe closed 4 years ago

landvibe commented 4 years ago

I think useEffect should be used to set ref.current for concurrent mode in this line

kentcdodds commented 4 years ago

Hi @landvibe,

Unfortunately that won't work. Go ahead and give it a try and you'll see why :)

landvibe commented 4 years ago

I know it won't work, I meant refactoring. Because the current version is not stable with concurrent mode.

kentcdodds commented 4 years ago

I know it's not stable with concurrent mode, but what you're suggesting won't work at all. Feel free to prove be wrong 😉