Considering if I should introduce Next.js to the team

This page summarizes the projects mentioned and recommended in the original post on /r/reactjs

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • Gatsby

    The best React-based framework with performance, scalability and security built in.

  • I guess that's what I meant by it not being a mistake. There's plenty of valuable lift that Next provides other than the things I mentioned. I don't think that it would be the "wrong" choice based off what you described. I guess I just mean that SSR, built-in API routes are two things that make Next special. If you're not using those, I think it's worth it to look into other frameworks like Gatsby or even starting off simply with Create React App and exploring from there.

  • next-redux-wrapper

    Redux wrapper for Next.js

  • Since then, though, I've been working towards moving us over to a new Next.js subproject as the long-term migration plan. Right now I've got Next proxied behind the existing Express backend, and I'm using s to show Next-rendered UI inside of the legacy client. Working great so far. (I've been wanting to do a blog writeup on this for months, but haven't had time.)

    I actually hadn't ever tried to use Redux with Next at all until just recently, when I added it to one specific page in the new client. My impressions are:

    • The big problem is that Next codebases are set up on a per-page basis, rather than the global app setup you see in CRA or React Native. So, the Redux store setup also has to be per-page if there's different reducer logic.
    • There's an assumption that you probably want to use Redux to do some SSR rendering, and then pass the initial state to rehydrate the store on the client as well. That's where tools like https://github.com/kirill-konshin/next-redux-wrapper come in.

    In our case we don't have any SSR or SSG going on. I ended up borrowing some store setup logic from the existing withRedux and withReduxToolkit examples in the Next repo, but skipped all the store persistence stuff.

    So, it's doable, but there's a couple additional aspects to consider beyond what you'd see in a CRA project.

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
  • Next.js

    The React Framework

  • Now I will admit, initial setup of some libraries may be more complex with the addition of having a server side to your project, but most everything has an example from their repo that you'd need https://github.com/vercel/next.js/tree/canary/examples

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts