useRunnerFoundation
A React Hook that delivers all the power of the Runner Foundation API through a convenient hook. This hook makes it easy to build a runner using React. In fact, all of Tripetto's stock runners are built using this hook.
Signature
useRunnerFoundation(
props: IRunnerProps,
options?: IRunnerSequenceOptions
): IRunnerFoundation
Parameters
Name | Type | Optional | Description |
---|---|---|---|
props | IRunnerProps | No | Specifies the properties for the runner. |
options | IRunnerSequenceOptions | Yes | Specifies additional options when the runner should operate in sequence mode. |
Return value
Returns the IRunnerFoundation
object to control the runner.
Example
import { useRunnerFoundation } from "tripetto-runner-react-hook";
function Runner() {
const runner = useRunnerFoundation({
definition: /* Supply your form definition here */
});
return (
);
}