insin / gatsby-plugin-dark-mode

A Gatsby plugin which handles some of the details of implementing a dark mode theme

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Theme toggle requires 2-3 clicks before changing theme

johndurso opened this issue · comments

When my site (work in progress) first loads or you hard refresh, the toggle takes 2-3 clicks before changing the theme.

This was occurring out of the box.

https://friendly-jones-0d961e.netlify.app/

Happens to me as well; the change from light to dark works as intended; toggling the theme from there on after also works as intended.

The problem is when I refresh after setting it to dark, it does load the dark theme and the checkbox does change state, but it takes 3 toggles for it to change to light.

I have the same problem, it starts with the dark theme, and to change it to light I have to click 3 times

I also came across this issue and found that the solution is hidden in the latest commit (83409b5). Since this is not part of the latest release, the changes have not made it yet to this plugin's pages in npm or Gatsby docs.

The latest commit solved the issue👍 I had the same issue though it worked perfectly.

I also came across this issue and found that the solution is hidden in the latest commit (83409b5). Since this is not part of the latest release, the changes have not made it yet to this plugin's pages in npm or Gatsby docs.

This really helps, Thanks @tiagofragoso