While converting this website to Next.js from Gatsby, I had to translate my approaches from the latter to the former. Specifically, how to render individual components on the server. As Gatsby sites are static by default, this was not something I thought much about. Working with Next.js and TypeScript had me scratching my head on this issue. I couldn't figure out how to render async components in TypeScript without being met with errors.
Thoughts on software development, technology, and other random philosophical matters.
React
Posts concerning the React framework and related tooling.
Increasingly more websites provide both dark and light modes for their users. Dark mode websites and user interfaces emit less light from the screen, which reduces eye strain, and as a result, increases productivity. Despite the benefits of dark mode, there are enough people that prefer light mode that it would be unreasonable to restrict all user interfaces to dark mode only. Let's build some components that will enable switching between light and dark modes.