Tom Oliver's profile picture
Tom Oliver

First impressions of Remix vs. Nextjs (pages router)

  • Obviously Remix is the newer kid on the block, so expect library support etc. to be less comprehensive.
  • It seems that Remix has changed its routing system recently. Unfortunately many of the tutorials out there use the old one (directory based), which is confusing.
  • Remix is less of a black box than Next. You are allowed to configure the entry.client.tsx and entry.server.tsx in any way you want to. This lets you take control of exactly how you do SSR and hydration.
  • At the time of writing, Remix heavily leans into using the latest React features like renderToPipeableStream which you will see in your entry.server.tsx. Unfortunately a lot of libraries are not up to date and still use renderToString in examples, like mui. So it can take a while to figure out how to integrate all of your libraries so that they are happy doing SSR.
  • Remix is a framework who's main abstraction is the data fetching on the server side. Nextjs (page router) has a similar concepts with getServerSideProps, getInitialProps etc, but it seems that Remix's solution is more all encompassing and unifying.
  • Nextjs is in weird limbo state at the moment where you have to choose between the pages router and the app router when you create your project. This is fine if you are sure exactly what feature you need, but in the case where you don't really know, Remix might be a safer bet.

No Webmentions for this note yet!