I work on a SPA written in React at work. It’s got the usual issues you’re likely all familiar with, and is massively over-complicated. I’m trying to do a proof-of-concept de-Reactification of a component or two, and not sure if this is a road that’s been well-trodden yet.
My current strategy is to pick a reasonably high-level component, replace its innards with a
dangerouslySetInnerHtml with an html response. But going down that path, I’m realizing this inside-out strategy is probably not going to cut it. It’s hard to avoid full page reloads, and we’d wind up basically having to re-implement something like Turbo in our components.
Coming from the other direction—doing server-side rendering, and then only rendering the remaining React components we’re not replacing (e.g., navigation and whatnot) will require a lot more work. We’d probably need to create another react component to handle Redux changes and all that fun stuff.
So I’m now curious: has anyone successfully dismantled a React application in an incremental manner? Any bright ideas how one might start down such a path?