This issue concerns the viability of this project outside it's current scope and the potential for white-label use down the line.
Currently questions are supplied via the questions.js file and take the form of an array. User inputs are handled in the App.js state and pushed to another array called vars. Ideally we'd want each form to have it's own declared variable name and not be generally held in the vars array since currently if any changes are made to the questions array those changes will impact the rendering of results and variable names declared in any calculator functions will need to be updated accordingly
e.g. const premium = this.props.vars[index] - index would need to change if the index of our premium question changes.
This issue concerns the viability of this project outside it's current scope and the potential for white-label use down the line.
Currently questions are supplied via the
questions.js
file and take the form of an array. User inputs are handled in theApp.js
state and pushed to another array calledvars
. Ideally we'd want each form to have it's own declared variable name and not be generally held in thevars
array since currently if any changes are made to the questions array those changes will impact the rendering of results and variable names declared in any calculator functions will need to be updated accordinglye.g.
const premium = this.props.vars[index]
- index would need to change if the index of our premium question changes.