WebReflection / augmentor

Extensible, general purpose, React like hooks for the masses.
https://medium.com/@WebReflection/demystifying-hooks-f55ad885609f
ISC License
134 stars 7 forks source link

useEffect cleanup - wierd behaviour? #9

Closed vbargl closed 5 years ago

vbargl commented 5 years ago

I was just experimenting and found out that useEffect does not have same behaviour as React's useEffect. I hope I did not misunderstood anything, but cleanup of useEffect hook completely ignores inputs and fires at next run. I have sandboxed two application with same (expected) behavior for augmentor and react.

Augmentor: https://codesandbox.io/s/p2rnn4oy40 React: https://codesandbox.io/s/qx2zm1o57q

WebReflection commented 5 years ago

Thanks, this was puzzling me as well, but I didn't have a proper comparison / test for it, now I do.

WebReflection commented 5 years ago

P.S. it should be fixed now