Using Split SDK in a micro frontend environment
This code example, contributed by Joshua Klein, shows how to employ a shared Split module injected into each of multiple micro frontend JS files. This approach allows for independent development and tooling without having multiple Split factory instances running the in the same browser.
What are micro frontends?
Micro Frontends are a relatively new architectural style that involves extending the concept of microservices to the front end of an application. Essentially, in a micro frontend architecture, each UI module is developed, deployed, and maintained independently. This allows independent teams to move faster and have more control over their individual components. Similarly to microservices this requires well-defined interfaces and APIs to ensure that intercommunication between micro frontends scales and is maintainable.
In this example we will show how to use Split as a shared utility that is in scope for each micro frontend.