4 ms·
IMO the big deal in Remix is partial hydration with React (not trivial to roll your own and do it well) and shipping perfectly functional websites without the n
by vosper 5y ago
IMO the big deal in Remix is partial hydration with React (not trivial to roll your own and do it well) and shipping perfectly functional websites without the need for JS.
It’s the framework that lets you develop in React + Typescript, without thinking about what’s server-side and what’s not, which also lets users consume pure, well-structured HTML plus the minimum JS that’s needed for interactivity.
Astro is also doing partial hydration for a number of frameworks, but it’s static only so it’s much more limited.
- dmitriid 5y ago> plus the minimum JS that’s needed for interactivity. remix's landing page uses 270 KB of Javascript split into 15 chunks. And it's static text with a couple of images. minimum
- tshaddox 5y agoRemix has no partial hydration features, right? Presumably it will work fine with React 18’s SSR Suspense features, but I’m not aware of any partial hydration features in Remix. Of course you can easily turn off JavaScript altogether in Remix by not including script tags in the HTML, but that’s not partial hydration.
- andrewingram 5y agoI believe you're right, Remix has no such features. Ultimately Remix can be thought of as a compiler that eliminates a lot of the boilerplate for which we could already do perfectly well back in 2015 (ish) with React Router 2 and 3. There's a bit more to it than that (mainly some magic related forms and data reloading), but if you were hand-rolling your own React SSR code back then, you'll find that the overall capabilities of Remix are somewhat similar -- just much less verbose.
- vosper 5y agoLooks like you are correct, I don't know where I got the idea that Remix does partial hydration from: https://github.com/remix-run/remix/discussions/680 https://github.com/remix-run/remix/discussions/680
- cercatrova 5y agoNextJS also does the same thing, it's just server side rendering
- lghh 5y agoBig difference from what I can see with my 2 hours with remix vs my hundreds of hours with Next is that you can do it on a component by component basis instead of a page by page bases. Also, POSTing data is a whole different beast.
- vosper 5y agoPartial hydration is not the same thing as what NextJS does, but, as others have pointed out, I was wrong about Remix doing partial hydration.