The type of the data in Passing
state.
The component props, including the Validation instance and rendering components.
A React node representing the rendered Validation state.
const MyPassing: React.FC<PassingProps<number>> = ({ value }) => <p>Valid: {value}</p>;
const MyFailing: React.FC<FailingProps<number>> = ({ messages }) => <p>Errors: {messages.join(', ')}</p>;
const validation = Validation.Passing(42);
<ValidationRender validation={validation} Passing={MyPassing} Failing={MyFailing} />
A component that renders a Validation ADT by matching its state to provided Passing or Failing components.