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
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 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 (
);
}