littlecranky67 4 years ago

Haven't heard of Remix, will give it a try. One thing that bugs me with Next.js is the missing data mutations part that Remix claims to address. When I setup my next.js project and was fetching data via getServerSideProps I was impressed. Until I realised there is zero support for mutating data. As soon as I need a single POST/PUT request, next.js support ends and you are back to writing your own fetch() code. It somewhat felt as if developers ended their day there, as you would definitely expect something that allows you to send data from the client to the server.

cockatiel_day 4 years ago

Remix's approach to fetching is unique and compelling for Rest APIs.

However, if you're working with a GraphQL API, you can eliminate all these much-mentioned fetch waterfall issues by using Relay as a client... Relay inspects the data needs of all your page's components and compiles them to a single page query. Relay also has a number of nice developer interfaces for common/annoying problems like pagination that I don't think are possible w/ Remix's approach.

This article is informative, but I think it misleadingly implies that you can't avoid waterfall fetches in Next (or that it only might be possible someday w/ React Server Components)... you can.

  • omgsean 4 years ago

    GraphQL comes with its own set of headaches though, especially if you're the person responsible for implementing the server.

    • pier25 4 years ago

      Exactly.

      Plus, if you're using something like Remix, you don't need an API layer anymore. The data goes from the query straight into the view.

austinpena 4 years ago

I’ve been pretty deep into next js for a while. I’m excited to give Remix a try.

Very big fan of fly.io as well, they’re smart folks and I run every service I can on them.

nsonha 4 years ago

The "pros" for nextjs seem believable, a non-bias piece /s

jmtucu 4 years ago

I started to use Remix and I love it, the nested routes / layouts is the most powerful feature for me. Also, the API is easier and cleaner than Next and the hooks to consume the data is a nice approach as well.

pictur 4 years ago

remix talks about too much simplification. Too much simplification scares me.

  • steve_adams_86 4 years ago

    I agree. Part of what my team likes about next is that although it doesn’t get everything perfect, it’s generally close enough and otherwise often within the realm of customization when it counts.

    The only exception might be the router. I’ve found it a little limited at times and there’s no way around it. This is one of remix’s apparent strengths, but it’s insanely comprehensive. I wonder if it might be too much in the other direction.

    • DangitBobby 4 years ago

      I spent a weekend playing around with Remix, and it didn't fail to deliver. I don't think you have anything to worry about.

      • steve_adams_86 4 years ago

        Thanks for this comment. It pushed me to take a closer look, and so far I'm really impressed. I'll definitely give this more of a chance. The Remix team has a solid grasp on the request waterfall and how to reliably optimize page loads. I have no doubt that Vercel will optimize this in Next as well, but as long as their router is so limited I don't see how they can compete on optimizing dynamic content. It'll be interested to see how it shakes out!

  • dbbk 4 years ago

    Simplification in this case means, it gets out of your way. The API surface is incredibly small. You have actually more flexibility than you do in Next.js with its proprietary methods.

jokethrowaway 4 years ago

Glad to see someone not focused on frontend.

Frontends are incredibly bloated already and next.js embedding react in any page is a killer for static websites.