Dynamic decode survey packages.
npm install @entropik/decode-survey-packages> Dynamic decode survey packages
 
``bash`
npm install --save decode-survey-packages
use node version 14.15.1
`SKIP_PREFLIGHT_CHECK=true
- create file .env at root level with following content SKIP_PREFLIGHT_CHECK=true
- npm install
- npm start
- cd /example
- create file .env at with following content ``
- npm install
- npm start
- Don't introduce state in render components i.e. components starting with Render. Render components are abstracted out strictly for render logic.Type1Question
- Don't add useEffect in render components either for the reasons mention above.
- Create a top level component for each question type.
- The top level component should be used for one question type only. This top level component will be imported by user to add a question type.
For example, a component called should be exported for QuestionType1 only. For QuestionTypes2, QuestionType3, create component Type2Question, Type3Question and so on. Introduce layers of components at lower level to handle the common logic.any
- Keep the state at a high level component (at single place for a question type) instead of breaking it down to smaller component. We may need it to create payload and pass it to getJsonData()
- Use consistent naming pattern for components and filenames.
- If there is stateful logic common accross multiple question types extract it out in a custom hook.
- Your code is your first level of documentation, add appropriate variable name and function names. Add comments wherever required.
- Define appropriate interfaces and types whereever required, don't abuse .
- Use BEM for classnames
- Keep the code clean.
- Don't leave commented code.
- Fix errors and warnings before merging it to master.
```
check /example
for the usage of each question types
MIT © ajit-kumar-Converz