Skip to main content

Questionnaire Response Store

The QuestionnaireResponseStore exposes the following properties:

  • sourceResponse
  • updatableResponse
  • updatableResponseItems
  • formChangesHistory
  • invalidItems
  • responseIsValid

Here's how you use the store hook in your React functional component:

import { useQuestionnaireResponseStore } from '@aehrc/smart-forms-renderer';

function App() {
const storeProperty = useQuestionnaireResponseStore.use.{insert_property_name_here}();

return (
<div>{storeProperty}</div>
);
}

There are some live examples on the following pages that demonstrate how to use the hooks.

Refer to the API Reference for more information on each property.

note

Do note that while editing the examples in this section, the page might move around as the outputs of all examples are updated in real-time.