Is server-side rendering the only way to go?

SEOs will always first recommend server-side rendering. But making the switch from client-side to server-side is cumbersome and time-consuming.

But server-side rendering is getting more and more traction thanks to React and its built-in server-side hydration feature. You can even use a prerendering solution like Preact. It has its own CLI that allows you to compile all pre-selected routes so you can store a fully populated HTML file on a static server. This lets you deliver a super-fast experience to the user, thanks to the Preact/React hydration function, without the need for Node.js.

Another option is to use prerender.io, which renders your JavaScript in a browser, saves the static HTML, and returns that to the crawlers. The Prerender.io middleware that you install on your server will check each request to see if it’s a request from a crawler (like GoogleBot). And if it is a request from a crawler, the middleware will send a request to Prerender.io for the static HTML of that page. And if not, the request will continue on to your normal server routes. This is a great option as crawlers will never know you’re using prerender.io (nor would they care), and you’re able to send the user and crawlers the most important information in static form while maintaining the flexibility that comes with client-side rendering.