Since I wanted to start from scratch, I figured this would be the perfect opportunity to try some new technologies. With NextJS being something I haven't actively worked with, I quickly chose this as my main technology, together with Apollo GraphQL, Typescript, TailwindCSS and Contentful.
Setting up this project took a bit of time, as it took some research and tutorials to find the best way to configure everything and get it all working smoothly. One of the bigger struggles I encountered was the implementation of the purge functionality of Tailwind. In my implementation, I accidentally pointed to the wrong folder, meaning that all of my actual styling was getting purged. Luckily I had some help from people on StackOverflow which quickly led me to victory!
Overal thoughts of Next
Since I use Gatsby most of my working days, I feel like it is hard for me to be completely objective towards NextJS. Both are great and I feel like they have their own positives and negatives.
I loved the short build time and clear documentation, and also found plenty of tutorials explaining how to implement the stack I was trying to use. The Vercel platform integration is definitely one of the nicest features when creating a simple Next project. It barely took any configuration and was very user-friendly.
Unfortunately, I haven't had the chance to play around with the SSR feature yet as I wanted to have all my data statically available. SSR however, is definitely another strong feature of NextJS.
Overall, I am very happy to have learnt the key concepts of NextJS and am looking forward to expanding my knowledge in future projects.
What about TailwindCSS?
Excluding the setup issues, Tailwind has been a great new addition to my stack and I even hope I can find a project which uses it. Mainly because I am a massive fan of efficiency and increasing productivity, and feel like becoming more used to Tailwind will only improve this!
Besides that, it is just a fun and modern way of styling! Simply awesome! If you have not been able to try it out yet, definitely give it a shot!
What about Apollo?
Since Gatsby is opinionated with GraphQL, there was no real learning curve here, besides some minor structural changes here and there, and getting the actual Apollo client running. (which had plenty of tutorials) I did however, struggle a bit with the GraphQL errors, as they were very vague and unclear.
It even took me until the end of the project to really get this figured out (mostly because I was too eager to continue working on other stuff), and turned out to be solvable by catching the API call in a catch function. Definitely good to know for future projects!
Overal, I am very happy with the project! And even managed to achieve a good lighthouse score without having to put in a lot of extra work. This because I configured my images, links and SEO information correctly in the beginning of the project which saved me the hassle at the end!