featured image

Why I moved back to NextJS

Over the last two years I rebuilt this site using several different front-end frameworks. I'm going with NextJS because it's the best supported. While I love VueJS, Nuxt didn't work (for me) as well as Next. I'm settling in with React and Next for a few years.

Long live NextJS

I erased and rebuild this site so often I should call it "The Chalkboard". That's terrible for traffic and SEO and so on, but it was helpful as I spent the last twenty years learning the technologies of the web and earning experience dealing with the many technologies needed to run a site.

But, it's time to grow some deeper roots. At this point of my career, there is less reason to keep up with the latest framework and more to go deep in one, becoming an expert.

I worked with several frameworks in the last year as I was looking for something that would last at least 5 years without major overhaul.

The easy part is that HTML, CSS, and JavaScript will continue to iterate and improve, but that's incremental learning for me. The hard part is finding a framework to use for maybe five years. Or more?

I decided to go with a React-based approach because it has the largest community. I enjoyed building with Vue more than React, but community size is what I'll need to make it easy to find answers when I need support.

I ran through some frameworks and am going to go with Next. I liked many others, but often they were too opinionated about things where I wanted more flexibility. Next has great docs, is updated regularly, has a large community, and is largely (completely?) funded by a successful tech company.

So I picked Next.

Long live SanityCMS

I started using Sanity more than a year ago for this site. Since then, I helped roll it out to a ~40 person editorial team and built two other sites with it for "blogs" friends wanted.

I appreciate the work the Sanity team is doing on their Headless CMS. This could be an entire post, by itself. The documentation is good, although it could use some improvements in places with better examples or illustrations.

For a very inexpensive (free for small sites) solution, the right price for me. It also has a javascript library to make access easy and has a healthy community of Next/Sanity users.

CSS & Tailwind

I'm still not a CSS expert

I'm not a CSS expert, but I really need this site to look better. I went with Tailwind because styling is bundled and plainly obvious as it's part of each component.

As a CSS newbie, troubleshooting styling issues is easier when all the styles are there in the code I'm touching. There's no need to flip back and forth between a code file and a css file to figure out what I've been doing wrong. (And I do plenty wrong, so the less I have to think, the better.)

I'd say that I appreciate that Tailwind has it's limitations. Styling a block of portable text from Sanity can be a little tricky. Styling portable text AND a code block inside of it can be really tricky as I tweeze apart the different things needed to make the code look good.

* But, in the end, I figured out the problems that
* were keeping me from styling code blocks embedded
* in portabletext with code highlighting, language
* selection, and allthat fancy stuff that makes
* a blog post look good.

console.log("Hello World!");