Skip to content

Dark/Light Mode switch not working properly. #61

Description

@TarunVishwakarma1
Image

when the user visits the page and is already in dark mode the toggle switch remains in light mode and dont change the theme. If click twice it changes to light and then works normally.

This bug is due to react component mounting before the theme is checked.

To eliminate this useEffect would be fine with theme as dependency array, as useEffect only runs when the component is mounted.

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions