10

SPA Composition

In the previous chapters, we had a glimpse of how micro frontends can be composed just using the browser without any active backend support. Most of the time, this technique becomes really interesting with increased user interactivity.

Today, single-page applications (SPAs) offer a rich interactive application feeling that many experiences target. Combining multiple components from standard SPA frameworks such as Angular or React is described with the SPA composition pattern.

The key factor for a SPA is that routing is not done on the server, but rather in the frontend. Routing in JavaScript requires techniques such as taking the URL’s hash or controlling the history API of HTML5. Then older features such as AJAX can be used ...

Get The Art of Micro Frontends - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.