Function: useLunatic()
useLunatic(
source
,data
,argOptions
):LunaticState
The first library entrypoint is the useLunatic
hook.
Parameters
Parameter | Type | Default value | Description |
---|---|---|---|
source | LunaticSource | undefined | JSON representation of our survey unit in the Lunatic Model. https://github.com/InseeFr/Lunatic-Model |
data | Partial <Record <"EXTERNAL" | "CALCULATED" , Record <string , unknown >> & object > | DEFAULT_DATA | Initial survey data (i.e. if it has been partially filled). |
argOptions | LunaticOptions | empty | Specific behaviour options. |