Next.js 9.5 has "Incremental Static Generation", could redwood and next.js be integrated now?

Next.js 9.5 has “Incremental Static Generation”, could redwood and next.js be integrated now?

1 Like

Hi @kino1! Thanks for posting and welcome to the Redwood Forums.

There’s a lot going on under the hood with both Redwood and Next that makes this a non-trivial question. At a high level, I agree with you that there could be interesting advantages and opportunities for an integration like this. But each framework has its own way of doing things and specific Developer Experience (DX).

Can you describe more about how you would see something like this ideally working? Or maybe provide some examples of a use-case you’re interested in?

I just tried to answer a very similar question regarding Gatsby + Redwood in this forum topic: How to use Gatsby with Redwood in a monorepo setup? Because Next can now work with a “traditional” API (vs. Gatsby’s unique model for handling data), there might be easier paths for using Next for the frontend and Redwood for the API. (Note: you can currently create a Redwood project that is only the API side without web/.) But the specific ways and conventions Redwood’s Web Side uses generators, has Cells, has its own Router, etc., would very likely require a lot of work to get working within Next. Meaning it’s not trivial if you want to swap the Redwood web/ for a next project.

All that said, I think everyone in the community would be intrigued by a Next + Redwood integration proof of concept. And to that end, I’m sure people would help be a sounding board for your ideas and code in-process. But as of now, this is not something we’re considering for the Redwood Roadmap. We’re focused on enabling pre-rendering in Redwood directly (no specific plans for incremental builds/generation).