Client-Side Composition
In the previous chapters, you’ve seen that micro frontends can be very well implemented on the backend, that is, being rendered by individual servers and then either composed via frames or by some aggregation layer. Now, we’ll shift a bit and look at how micro frontends can be stitched together on the client. Usually, this means in the browser.
As the example of the tractor store already indicated, server-side composition may bring some challenges for interactive pages. If you recall the issues with the form handling, we could have had a much easier time solving this purely on the client.
In this chapter, we will cover the pattern of client-side composition, which gives us yet another possibility to set up and implement micro frontends.
In general, client-side composition can be introduced in many ways. For this chapter, we’ll go with web components. This way, we’ll be independent of any specific JavaScript framework, ultimately...