Skip to main content

useRunner

A React Hook that delivers all the power of the Runner library 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

useRunner(
props: IRunnerProps,
options?: IRunnerSequenceOptions
): IRunner

Parameters

NameTypeOptionalDescription
propsIRunnerPropsNoSpecifies the properties for the runner.
optionsIRunnerSequenceOptionsYesSpecifies additional options when the runner should operate in sequence mode.

Return value

Returns the IRunner object to control the runner.

Example

import { useRunner } from "@tripetto/runner-react-hook";

function Runner() {
const runner = useRunner({
definition: /* Supply your form definition here */
});

return (

);
}