29. Global CSS and Style Injection
The Problem
Micro-frontends can bring component-specific styles that need controlled injection and isolation.
The React Difficulty
React applications often rely on CSS modules, CSS-in-JS, bundlers, or global stylesheets. Micro-frontend teams must choose and enforce a style-isolation strategy.
React Approach
import "./Sales.css";
function Sales() {
return <section className="sales-panel">Sales</section>;
}
MS Approach
ManySet provides a direct runtime-oriented approach for this recurring business-application task.
ms.style.inject("./Sales/Sales.css", "msgrid");
// MS scopes aliases and manages style injection through its runtime.
Why this way is useful in business applications :
The comparison is intended to show where ManySet supplies a business-application abstraction around a recurring task, while keeping HTML and JavaScript visible and directly usable.
Key Point :
ManySet reduces the amount of framework-specific composition required for this particular task, without requiring the React/Angular mechanism to be represented as inherently wrong or incapable.