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

Fix possible duplicate of editors in vite sample #3390

Merged
merged 3 commits into from
Jan 31, 2023

Conversation

tr3ysmith
Copy link
Contributor

In testing the vite sample, I could see duplicate editors created on the screen. From what I can tell, this was due to the if statement checking if editor was null in the useEffect. However, the editor variable would not be updated on the first re-render causing a double instance. I adjusted the editor check to be inside the state dispatch since it would have the most current information. This seems to have fixed the issue on my end.

Trey Smith added 3 commits November 1, 2022 10:29
In testing the vite sample, I could see duplicate editors created on the screen. From what I can tell, this was due to the if statement checking if editor was null in the `useEffect`. However, the editor variable would not be updated on the first re-render causing a double instance. I adjusted the editor check to be inside the `state dispatch` since it would have the most current information. This seems to have fixed the issue on my end.
@hediet hediet added this to the January 2023 milestone Jan 31, 2023
@hediet hediet merged commit c92637e into microsoft:main Jan 31, 2023
@tr3ysmith tr3ysmith deleted the patch-1 branch January 31, 2023 14:06
@github-actions github-actions bot locked and limited conversation to collaborators Mar 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants