DEV Community

Cover image for 3 reasons why you should use Remix instead of Next.js
Alexandro Martinez
Alexandro Martinez

Posted on

3 2

3 reasons why you should use Remix instead of Next.js

3 things that I came across this week:

1. Developer Experience

I tried migrating the React (Frontend only) to Next.js and I got tired, I built about 50-70% but I did not like all the workarounds I had to do, such as getLayout. I'm about to finish a Frontend AND Backend (previously with NET Core) version with Remix, and I learned about Remix last Saturday I think.

2. React Router / Layouts

Since Remix is built on top of react-router v6, I set up my application using multiple layouts. For example, I have 2 application layouts, AppLayout (/app) and AdminLayout (/admin). When migrating to Next.js, look at all the "AppLayout" occurrences:

AppLayout - Nextjs

Notice the 114 occurrences? And this is just for AppLayout, I have worked with many more layouts. I'm sure there's a better and cleaner way to do this, but I did not find it. That's part of the Developer Experience.

Now with Remix, 9 occurrences in 3 files:

AppLayout - Nextjs

3. State management

Instead of using redux to get the state, I can get it with useMatches. This is what my app loader looks like:

useMatches

So I can access this data anywhere that starts with /app/* or /admin/* with the useMatches() hook, without spinners all over the page.

--

I'm going to give Next.js a try (again). But for now, I'm sticking with Remix.

Image of Docusign

Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs