Closed A-Shleifman closed 2 years ago
Wow, to tell you the truth I'm not sure why I wrote it the way I did. The implementation you supplied is much more clean. Regarding the useAtomCallback point, Maybe I've seen an example in a different place without the useCallback.
I'll push a fix in the coming minutes, Thank you :)
@A-Shleifman Thanks for the issue, I added the fix you suggested. (I think I havent encountered a problem since my Root component never re-rendered).
Feel free to open issues if you find more ;)
Thank you very much! :)
Thank you @omerman for publishing this!
This library didn't work for me in some scenarios and I noticed that it didn't have a
useCallback
wrapper inside theuseAtomCallback
function. According to the docs it's required. Adding it fixed the problem for me.I also might be missing something, but why not just expose the functions provided by the hook itself? Something like this: