If you'd like to see it in action and read the post how I originally intended it (trust me, it'll be worth the extra click π) You can check out my full post here: sreetamdas.com/blog/the-perfect-dark-mode I am a huge fan of Josh W Comeau's website...

Markdown supported Β· ββ΅ to post
Shad Mirza
Building Hashnode
Very detailed and much recommended read for people using Next.js and want a perfect dark mode.
Also, you provided a really good explanation of
dangerouslySetInnerHTMLπ.