FormState

API / @publicodes/forms / FormState

type FormState<RuleName> = object;

Defined in: form.ts:16

Type Parameters

Type Parameter
RuleName extends string

Type declaration

NameTypeDefined in
currentPageIndexnumberform.ts:19
lastAnsweredRuleName | nullform.ts:21
nextPagesRuleName[][]form.ts:20
pagesRuleName[][]form.ts:18
targetsRuleName[]form.ts:17

Description

The state of a form. This object describes the current state of a form, including the current page, the list of targets, the list of pages and the last answered question. It should be stored in your application, and made reactive (useState, $state, etc.).