Module: native/Questionnaire/context
Type aliases
QuestionnaireContext
Ƭ QuestionnaireContext: Object
Type declaration
| Name | Type | Description |
|---|---|---|
answers | QuestionAnswerInput[] | The answers that are given on previous questions |
customComponents | QuestionnaireComponents | Custom reply type components |
index | number | The index of the question that is currently being asked |
question? | QuestionnaireQuestion | The current question that is being asked |
questionnaire | Questionnaire | The original questionnaire that must be filled in |
rindex | number | The index from the end of the question |
change | (ans: ValueObjects, text?: string) => void | - |
close? | () => void | - |
input | (ans: ValueObjects, text?: string) => void | - |
next | (diff?: number) => void | - |
submit | (answers: QuestionAnswerInput[]) => void | - |
Variables
Context
• Context: Context<null | QuestionnaireContext>
Functions
QuestionnaireProvider
▸ QuestionnaireProvider(__namedParameters): Element
Parameters
| Name | Type |
|---|---|
__namedParameters | QuestionnaireProviderProps |
Returns
Element
useQuestionnaire
▸ useQuestionnaire(): QuestionnaireContext
This hook provides the questionnaire data