ContributionBoundary
OrganismError boundary for one contribution (a slot item, tab, widget or block): when it throws, only it is replaced by `fallback` (a node or `({ error, reset }) => node`, nothing by default) and its host keeps working. `onError(error, info)` reports; `resetKeys` resets when any value changes.
Contact: Jane Doe
Call log: 3 missed calls today.
The host keeps rendering whatever the contribution does.
<ContributionBoundary
onError={(error) => report(error)}
fallback={({ reset }) => (
<UnavailableContribution reason="failed" size="node" title="Call log" action={{ label: 'Retry', onClick: reset }} />
)}
>
<CallLog contactId={id} />
</ContributionBoundary>Contact: Jane Doe
Call log: 3 missed calls today.
The host keeps rendering whatever the contribution does.
// No fallback: a broken contribution simply disappears for end users.
<ContributionBoundary onError={(error) => report(error)}>
<CallLog contactId={id} />
</ContributionBoundary>