Donavon West

Results 41 comments of Donavon West

This one-liner works for me locally (I haven't tried it on Vercel or anything). No looping and no variable declarations. I'm using Next.js 12.1.0. ```ts import Crypto from "crypto"; Crypto.timingSafeEqual...

do you have a small app that I can try this out on?

`useDarkMode` keeps state, so there's no reason to use your own `setState`. I changed your code and this works for me: ```js const { value } = useDarkMode(false, { classNameDark:...

In `nav.js`, you can just to this: ```js const { toggle } = useDarkMode(); ``` then ```jsx {theme == 'dark' ? ( ) : ( )} ``` No lambda function...

@TenDan `useDarkMode` (or any hook for that matter) can NOT be used inside of a `useEffect` hook. There's also no need. As to using `html` instead, you can always specify...

Can you give a short example of this failing in SSR that I can clone and run locally?

I like the idea. let me look into it. PRs welcome ;)

@benwiley4000, My concern with this approach is that there is a lot of adding and removing of `div`s to/from the real DOM whenever a component re-renders. I understand that a...

@benwiley4000, I'm open to a PR if you'd like to take a stab at it. ;)

Hmm... Interesting. Have any ideas? Seems like a different package, but would share many of the same functionality.