There are seemingly endless articles online for building web applications with React. Almost every single one assumes you are building a Single Page Application, from scratch, using React.
But to me, one of the most impressive things about React is that you can add React components to any web application without it being a SPA (and let’s be honest, there are very few necessary reasons to build a SPA). So you can get the benefits React without rewriting an entire front-end.
Here’s what I’ll be covering
- The Tool Set and Build Process – The different tools I chose and how they were weaved into a PHP-centric build process
- Rendering Single Components – How small components are independently added to existing server side rendered pages
- Rendering “SPAs” – How entire pages are rendered as very small Single Page Applications
The versatility of how React can be used to build new applications or augment existing ones is really powerful. Unfortunately, most information focuses on greenfield, single page applications. Hopefully this ends up being useful to other folks who want to make incrementally add React to existing applications.