Now, there are problems with making those sorts of migrations. We all felt the pain of having to move over to classes and, like, should we even bother all that? By the end of it all, we're much better off. And I'm really grateful to the React team for creating hooks. It's made my job a lot easier.
So now it's my favorite part, and I want to talk to you about Remix. How many of you have heard of Remix? How many of you who are raising your hands heard of it because I tweet about it nonstop? Yeah, so most of you. So yeah, I tweet about Remix nonstop because I love it. So full disclosure because people always want that. There has been a transaction between me and the Remix team, so I had to pay them money to access Remix. But that is not going to be the case. They say in a few weeks, Remix will be open source completely and free, and so you will be able to use Remix as well. So let me sufficiently hype you up about this. I don't have a ton of time to go through everything, but I want to just give you a high level because Remix is the reason that I started thinking about problem elimination in the first place.
So the first thing that Remix does that just makes it phenomenal is nested routing. One nice thing about this is you no longer have like a route that's like slash users, slash IDs, slash contacts or something. Now you have in that route file, whatever framework you're using, you probably have to render your layout route. And that will include your header and footer and everything. With Remix, you have nest routing. So each one of those is going to just be the component that cares about the part of the route that this part of the route URL cares about. That's really nice. But to take it even further, that's just like a nice developer experience sort of thing. But because of nested routing, Remix can do a lot of awesome optimizations as far as loading your data and validating the cache and loading the right data so it doesn't load more unnecessarily. That's a really cool thing, because Remix has nested routing built in.
Another thing that I love about Remix is the seamless client and server interaction. Just like Next has the Git server side props, you've also got a loader with Remix. But Remix does a really great job of making that connection very seamless, as I say here. So you've got a can be fully typed. You can go make all of your requests to database or GraphQL or whatever it is, and then all of that data is just available in your component and they have really nice declarative error handling and so as far as your component is concerned, the data is there and you never have to even worry about error states or loading states, because all of that is declaratively handled for you, so by the time it gets to your component, you just you don't use use use effect, maybe that's all I need to say, like whoo! Yeah, I don't use effect, all right, and you don't need a tool like React query, if you're not using remix, you should use React query, but if you are using remix, you don't need it because React query solves a big and awesome problem, thank you, tanner, for creating it and those who are maintaining it now, but wouldn't it be great if we didn't have the problem to begin with, and that's what remix gives us with its awesome client-server interaction.
The other thing I love about remix is that it's based on the web, so everything is fetch API stuff, even on the server, you have a request and a response, and if you need to learn something about that, you're not going to the remix docs, you're going to MDN to learn about how the web APIs work for that. And aside from the transferability of knowledge, you also get the fact that, because they're the web APIs, we can run this in a Cloudflare worker, or in a service worker, and Cloudflare workers are currently supported, service workers eventually, they'll support that.
Comments