Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

logs missing before useEffect hook #45

Open
timiscoding opened this issue Sep 28, 2021 · 2 comments
Open

logs missing before useEffect hook #45

timiscoding opened this issue Sep 28, 2021 · 2 comments
Assignees

Comments

@timiscoding
Copy link

Firstly thanks for making these devtools!

However, I've run into an issue where atom updates are missing in the logs and I've narrowed the issue down to a particular scenario. I have an atom which contains a list of ids and whenever it gets a new id added, it renders a component that updates another atom on initial render. This is done in an effect hook and when I look at the devtools, they only show atom state from the effect hook and not the ids list.

I tried reproducing the issue in a codesandbox but it's not 100% the same behaviour. If you keep clicking the button, it seems to arbitrarily switch between showing the ids and the effect hook atom. But in my own code, it only shows the effect hook atom.

https://codesandbox.io/s/recoil-devtools-useeffect-bug-k272i?file=/src/Item.js:194-294

@ulises-jeremias
Copy link
Owner

@timiscoding hey! sorry for the delay! thanks for opening this issue!
I'll try to make a fix for that this week and I'll keep you updated with this.
I'll send here the new library versions once everything is fixed 👌🏻

@ulises-jeremias
Copy link
Owner

I was able to reproduce the bug and I'm working on a fix right now 👌🏻 @timiscoding

@ulises-jeremias ulises-jeremias self-assigned this Oct 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants