I've built an relatively high-traffic SSR'd React website from scratch, and I've done the prototype for the rebuild of the website at work (we're moving away from Gatsby). The reason I'm considering Next is precisely because what i'm building isn't a "web app" like Spectrum, but merely a website (with some e-commerce features).
The sweet spot for Next.js seems to be that you're trying to make something that resembles a traditional pre-React-era website in structure, but just happens to be built using React. Once you're building an app, it doesn't feel like the best tool for the job. You can obviously bend Next to your needs, but fighting the framework is the last thing you want to be doing in the first year of a startup's life.
They managed to get an exit, which is a great result. And obviously they've learned a lot in the process which is another great outcome. But I can't help but feel that having just one experienced engineer on the team would have made their road a lot less bumpy.
For A/B tests you could generate all the variations during build and have whatever sits in front of the site be responsible for serving the right files, but this just feels like an admission that, yes, static sites have their limits. For user-specific stuff the only real solutions are to go back to having pages be server-generated, or go all in on technologies like Edge Side Includes.
https://mobile.twitter.com/andrewingram/status/1085544564738...
Finger crossed.
Screenshot: https://boring.host/MWDuAnO
Hence why React is not the same as React-Native-Web.
If they would have used react-native-web, he would have saved some time writing the Android (or IOS) apps. Because he could have reused the code (he said that too).
This is what I have done, anyway. Also react-native-web is very very high quality library. I am just amazed at the quality Nicolas Gallagher is putting out.
My app now runs on web and via browser on android/ios with all the magic of responsive UIs, reshaping all those positions when a user rotates the screen or zooms out.
I am wondering, on occasion why I spent time on native apps (even with React Native) -- at all, as React Native Web (with a bit of React-bootstrap) -- are just amazing.
Wrt next.js, at least when I looked at it mid last year, did not support routing with React-router. And for me it was a big deal, I did not want spend time on learning specifics next-js routing.
Instead I went with https://github.com/jaredpalmer/razzle which supports React Router for routing, which I use Android/react-native and React-native-web, uniformly.
React-router, is also very good and useful library with nice, intuitive architecture for routing.
At the end, I decided for my need the Server Side rendering is a later-stage item. So I have not spend more time on it.
I suspect Spectrum did not loose much traffic because their app is not using SSA routes.
Zulip chat app (may be they are spectrum's competitor, not sure) - uses React Native for mobile (https://github.com/zulip/zulip-mobile ), but something else for web. As a reference.
ReactDOMServer.renderToStaticMarkup();
I'm curious about what you consider complex about an SSR setup with React, I'm becoming very familiar with the internals of React and frameworks like Next and they're often relatively thin wrappers over the built-in features.
Is the answer any different for React Native? (I guess you lack a server-side renderer at that point, so maybe it's easier to plan to do everythig in React if you plan on using React Native?)
I'm doing it at work in an app that's still 80% Backbone. We're replacing Backbone Views piecemeal, with each chunk becoming a separate React component tree [0]. It's certainly easier if it's all one big React app from page load, though.
I haven't used React Native myself, but I _think_ you can use RN in a similar way. I think I remember reading that the Facebook app uses RN for certain pages, but not others.
[0] https://blog.isquaredsoftware.com/2017/07/react-redux-backbo...