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:
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:
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:
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.
Top comments (0)