| Personally I feel like I've unlocked a superpower with this one trick (using rails, but this applies equally to django and similar "old" page-load-based frameworks) 1. build your app in the normal, old way. just doing SSR for showing and editing boring content is so much faster than building it in react. 2. I have a tiny scrap of JS that digs through elements on the page, and if they have a class, creates a React root there and passes in some params. I then wrapped generating those replace-me-with-a-react-root elements in a Rails helper function. (2 is my "fine I'll do it myself" after Rails 7's new js stuff broke react-rails for me.) This might be colored by me being a backend dev and data engineer type of person and I have terrifically little patience for writing javascript. But pages where I've followed this "SSR + some React doodads for when you really need special sauce" pattern end up so much easier and faster to write than cramming it all into a huge SPA. I'm sure if you're building something deeply fancy then doing it all in React makes sense, but I find there's really only a couple pages that actually do end up being 100% react and the rest end up fine just having a text field here or there or a little widget thingy being the React components and the rest just being SSR. I'm sure this doesn't scale if you're google or something either but even on my most complicated pages this still loads visibly faster than many other sites I use. |