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

Bugfix/bug] in theme toggle button #98 #116

Conversation

Janith-Chamikara
Copy link
Contributor

@Janith-Chamikara Janith-Chamikara commented Mar 29, 2024

Summary

This PR is to fix the flickering issue of the theam toggle button

Description

This issue has occured because the callback function inside the useEffect only runs after the dom mutations and browser paints the screen.So in order to fix that I used useLayoutEffect instead of useEffect as the provided callback inside the useLayoutEffect runs before the browser paints the screen.

Images

Wanderlust.-.Google.Chrome.2024-03-29.12-04-15.mp4

Issue(s)

#98

Prerequisites

Copy link

vercel bot commented Mar 29, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
wanderlust ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 29, 2024 8:20am
wanderlust-backend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 29, 2024 8:20am

Copy link
Owner

@krishnaacharyaa krishnaacharyaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @Janith-Chamikara for the very quick PR, just a couple of concerns

  1. Please follow the 5th point of the contributing guidelines
  2. Address Issues section in the description, please properly update it and the below section by referring other merged PRs

@Janith-Chamikara Janith-Chamikara deleted the bugfix/BUG]-In-Theme-Toggle-Button-#98 branch March 29, 2024 16:12
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.

Centralised Error Handling
2 participants