For some sites, it's not really feasible to statically render them with something like Gatsby.
Think something like IMDb.com (idk how they build their site, but I think it's a good example). It has thousands of pages for every movie, TV show, actor, etc and generating all of those pages at build time would be pretty tricky. Maybe it could be done, but it wouldn't be how I'd do it.
Kinda, but IMO this is one of the downsides of using nextjs. We are considering using it at work, but their routing system is pretty poor. I remember reading that they might look into integrating react router in future but that's it's low priority for them.
Removed due to the API changes proposed June 2023. Due to the irrational and unreasonable behavior of Steve Huffman, I have decided I will no longer subsidize Reddit with my free engagement.
Just to clarify your point, yes you do need Node for the SSR. There is another option to statically render everything with Next, which also works great but is a different approach.
And yes, you can keep all your backend API's on another server. I'd recommend it.
I think that depends on what kind of performance you're looking to improve. Initial load time, data fetching time, max concurrent users, etc. But generally speaking, if you set it up correctly it should be about the same or a little faster.
2
u/[deleted] Sep 11 '18
Next VS Gatsby, which one is better? I use Gatsby and I like it, why should I use next?
2
u/audioverb Sep 11 '18
Does this serve as a replacement for React-Router?
1
u/GoblinsStoleMyHouse Sep 11 '18
Great guide π
1
u/fisch0920 Sep 11 '18
Great, concise breakdown -- thanks!
0
u/[deleted] Sep 11 '18
[deleted] β view deleted comment
3
u/[deleted] Sep 11 '18
[removed] β view removed comment