React single-spa Tutorial: Mount Applications Within an Orchestrated Shell
Single-spa orchestrates applications according to registration and activity rules. A React application supplies lifecycle integration so the shell can bootstrap, mount and unmount it at the intended time. Clear ownership of containers, routes and shared resources prevents one area from disrupt another during navigation.
Here's a popular React single-spa video — watch it, then summarize it with one click. Or paste any other YouTube link below.
— or paste your own YouTube link —
Want to keep the key points from a YouTube video? Paste the link below to turn it into structured notes.
Why Use React single-spa Tutorial: Mount Applications Within an Orchestrated Shell
- Register an application with activity rules
- Supply supported lifecycle integration
- Mount into the intended container
- Release resources during unmount
- Coordinate shared dependency assumptions
Frequently Asked Questions
What does an activity rule determine?
It determines when an application should be active within the shell, commonly according to the location. That rule establishes orchestration behavior rather than replace the application's own internal route handling.
Why must mounting have a clear container owner?
Several applications can coexist under one shell, so each needs a deliberate target. Reusing an unrelated container can overwrite another area or make unmounting remove content it does not own.
What belongs in an application's unmount behavior?
Release its mounted React tree and separately owned resources such as listeners. The lifecycle should leave the shell and other applications intact rather than assume navigation reloads the complete document.
Does single-spa automatically share every dependency safely?
Dependency sharing is an architectural configuration concern. Align the integration's assumptions, especially around rendering libraries, instead of assuming independently delivered applications always combine compatible runtime instances automatically.
How should internal routes relate to shell activation?
The shell determines the application's active boundary, and the application handles its intended inner navigation. Define that relationship so route changes do not make competing owners disagree about which area should remain mounted.