Aller au contenu principal

Function: useLunatic()

useLunatic(source, data, argOptions): LunaticState

The first library entrypoint is the useLunatic hook.

Parameters

ParameterTypeDefault valueDescription
sourceLunaticSourceundefinedJSON representation of our survey unit in the Lunatic Model. https://github.com/InseeFr/Lunatic-Model
dataPartial<Record<"EXTERNAL" | "CALCULATED", Record<string, unknown>> & object>DEFAULT_DATAInitial survey data (i.e. if it has been partially filled).
argOptionsLunaticOptionsemptySpecific behaviour options.

Returns

LunaticState

Defined in

src/use-lunatic/use-lunatic.ts:70