22. Dynamic Tabs and Wizards
The Problem
A wizard can create step screens dynamically, and a tab can load its content only when the tab is selected.
The React Difficulty
React can implement this with state and conditional rendering, but dynamic screen ownership and mounting become application-level composition logic.
React Approach
const [step, setStep] = useState(1);
return <>
{step === 1 && <CustomerStep />}
{step === 2 && <AddressStep />}
<button onClick={() => setStep(step + 1)}>Next</button>
</>;
MS Approach
ManySet provides a direct runtime-oriented approach for this recurring business-application task.
const wizard = await ms.inject("./Wizard", "content");
const customer = await ms.inject("./CustomerStep", wizard.step1);
const address = await ms.inject("./AddressStep", wizard.step2);
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.