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 zoom on hover not working with React 18 - development mode 💞 #205

Merged
merged 2 commits into from
Sep 28, 2023

Conversation

willnguyen1312
Copy link
Owner

@willnguyen1312 willnguyen1312 commented Sep 28, 2023

Since React's useEffect got called twice during development mode. This causes some unexpected behaviour during development mode. This PR fixes exactly that by carefully detecting whether DOM is mutated correctly by React before making further execution :)

@codesandbox
Copy link

codesandbox bot commented Sep 28, 2023

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@willnguyen1312 willnguyen1312 merged commit 50e34c9 into main Sep 28, 2023
@willnguyen1312 willnguyen1312 deleted the add-option-on-hover branch September 28, 2023 13:44
@github-actions github-actions bot mentioned this pull request Sep 28, 2023
@willnguyen1312 willnguyen1312 linked an issue Sep 28, 2023 that may be closed by this pull request
@willnguyen1312 willnguyen1312 changed the title Fix zoom on hover not working with React 18 💞 Fix zoom on hover not working with React 18 - development mode 💞 Sep 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Usage for React & Nextjs
1 participant