-
Notifications
You must be signed in to change notification settings - Fork 75
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
Fast Refresh oddities #25
Comments
I think this should be fixed in 0.19.3, but please let me know if it's still happening. Thanks for the report! |
Thanks, that was fast! Confirming it's fixed in 19.3 for the If I have an
I get the duplicate issue again though. |
I think that actually makes sense since the observe is never cleaned up? I'm not an expert on all the intricacies of Fast Refresh though. Do you know of a way to fix that, to dispose it when the file refreshes? |
I'm noticing observers being called an increasing number of times after fast refresh.
After a fresh reload I get the logs:
if I save ComponentA.tsx without making any changes fast refresh triggers and I get an addditional single console.log:
If I then go and save ComponentB.tsx without making any changes fast refresh triggers and I get 2 console.logs with newer timestamps
If I then go back to save ComponentA.tsx again and save without making any changes I get an addditional single console.log:
Then if I go back and save ComponentB.tsx without making any changes, I get 3 console.logs with newer timestamps
This will continue, every time I save ComponentA it seems to add another observer, which then gets triggered if I save somewhere else. Interestingly if I save ComponentA 10 times in a row before saving ComponentB, it only seems to add 1 more observer log.
Any idea what's happening?
App.tsx
ComponentA.tsx
ComponentB.tsx
state.ts
settings.ts
The text was updated successfully, but these errors were encountered: