implementation.tsx
// The "One Component" Myth is solved via a Registry.
const TEMPLATE_REGISTRY = {
INFRA_SIGNAL: <InfraTemplate />,
DATA_SIGNAL: <DataStackTemplate />,
PAIN_SIGNAL: <PainDetectorTemplate />,
};
export default function SignalRenderer({ payload }) {
// Identify the Signal Type
const Template = TEMPLATE_REGISTRY[payload.type];
// Render the correct "Weapon"
return <Template data={payload.data} />;
}