02. Passing Parameters
The Problem
A parent screen may need to open a reusable component with a customer ID, invoice ID, or other business context.
The React Difficulty
React normally passes values through props. The parent and child must follow the component's prop contract and the child reads those values through JSX/JavaScript.
React Approach
function Customer({ customerId, mode }) {
return <div>Customer {customerId} — {mode}</div>;
}
<Customer customerId={1001} mode="edit" />
MS Approach
ManySet provides a direct runtime-oriented approach for this recurring business-application task.
const customer = await ms.inject(
"./Customers/Customer",
"content",
{ customerId: 1001, mode: "edit" }
);
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.