When Remix was first announced, by the gentlemen behind React Router, I knew it was gonna rock...eventually. I figured they would need some time to work out the exact APIs. That it was released initially as a paid offering was all I needed to ignore it for a bit to let it mature. When it became open source several months later, my interest was piqued.
I've been using Next.js since it was in version 1.0. I fully understood all that it was doing for me, because I had extensive experience cobbling together such a site using Webpack, React Router, Express, Server Side Rendering, Hot Reloading, and all the hot new technologies in 2015. Even after authoring open source libraries used by millions of companies around the globe, React Redux Universal Hot Example remains my repository with more Github stars than any other. People are still starring it, despite all the cobwebs, as I have not touched it in six years. Every once in a while, someone will come up to me a conference and thank me for it, telling me that they built and launched and grew a startup using that starter kit. So I've been starting every project with Next.js and recommending that everyone do the same for years and years.
All that is to say that I was highly skeptical that any framework could come along and unseat my beloved Next.js from its pedestal. Nevertheless, I went through the Remix Tutorial – which is different (better) now than it was when I did it – to see what these Router boys were up to.
Within an hour, I was hooked. I will never start a project with Next.js again.
I've been building websites since all pages were static files. When it was
discovered that you could execute code on the server – I ❤️ U
/cgi-bin! – to
dynamically change the HTML that was downloaded we were off to the races!
So I also come to Remix with a fundamental understanding of the ...errr... fundamentals of HTTP and how the web works. Seeing Remix embrace The Platform™ warms my heart. That said, I remember why we all moved away from The Platform™... because browsers sucked! But now that Internet Explorer is rotting in its grave, I think it might be just the right time to return to the fundamentals.
When Remix Conf 2022 was announced, I immediately began brainstorming ideas interesting enough to attract the attention of the Remix team. In my dayjob at Centered, I have been introducing XState state machines at every opportunity, and it invariably improves the codebase. There was even one particularly complex bit of backend logic, accepting a webhook from Linear, where I chose to implement it as a state machine, and, wouldn't you know it?, it improved the readability and robustness of the code. Remix is so elegant about how it does stuff on the backend, I began to wonder if I couldn't come up with some sort of an app to use a state machine on the backend using Remix. My previous talk was about using XState to implement an e-commerce checkout flow, so what if I could do that entirely on the backend?
Narrator: "He pulled it off."
I wrote the prototype entirely on a transatlantic flight in February, and shared the code with both the Remix and XState teams. My talk was sort of accepted at RemixConf. I was chosen as a backup speaker. This was a new concept to me, but it makes total sense. I was to have all the perks of a speaker, travel, expenses, hotel, etc., but rather than give my talk in front of the conference attendees, it would be to an empty auditorium the night before, and the talk would be released on YouTube with all the others, so future people wouldn't even know it was to an empty crowd. Great plan! I was just delighted to attend the conference!
As luck would have it, one of the speakers had some visa issues, and I was bumped up to give a talk in front of an audience. And it made all the difference! I've never given a talk with such an enthusiastic audience!
So, without further ado...