Home > front end >  Can you use both Gatsby and Next js for a single react js website?
Can you use both Gatsby and Next js for a single react js website?

Time:12-05

I'm curious if it's possible, and if possible advisable to use both Gatsby and Next js. From a beginner's eyes, it seems like the choice of which to use could come down to a page by page need, rather than a site by site need. The project I'm working on now has pages that could easily benefit from being static HTML/JS/CSS pages, but other pages are dynamic and would benefit from React/Next.

Is there any reason you can't combine the two in a single site on a page-by-page need, and if so anybody knows of resources of how to do this efficiently?

Thank you in advance.

CodePudding user response:

There's so much overlap between them that I’m not sure there’s sufficient reason to do this—they can both do the job you're referring to.

You may run into some collisions in the build output and they aren't going to route client-side across app boundaries, so overall it'd be a worse user experience anywhere the user goes from one to the other. Otherwise, though, it seems viable.

  • Related