Consistent User Experience
When designing a decoupled architecture, particularly the decoupled frontends, we will need to make sure the user experience remains cohesive and coherent, across the many micro parts. This is one of the reasons why governance is vital to succeed.
Imagine loading a page composed of several micro applications, and each one of them has a different representation of state via the UI. Just a simple UI element, like a link, where the state (active, visited, focused) is represented in an inconsistent way, can be enough to confuse the user, and ruin their experience while visiting the application.
Consistency is key
An inconsistent experience can render the whole application useless.
State Management
A sync'd state is essential to preserve a good user experience across decoupled frontends. You can refer to the pros and cons page, to understand why state is very important.
Event-driven patterns and middleware can help propagate state across decoupled components, even when independently deployed, or deployed hrizontally at scale.
Pub/Sub
A publication and subscription bus is a a good strategy to manage state, and it can be implemented at an infrastructure level, with serverless functions, or client-side, leveraging the browser's addEventListener API and windows.postMessage(), to communicate events across frontend components.
image caption: publication and subscription bus
Persisting state
Although not everybody will agree on this statement, I am one of those system architects that believes state should be almost exclusively persisted at a database level, and that when you need client-side persistence, we should be using one of the many options -cookies, localStorage or IndexDB, depending on the case, but only as a proxy to a database in origin.