survey-form module is a module with SurveyForm container which render survey form based on schema fetched from API based on surveyId property.
- Run
yarn add https://github.com/HealthByRo/survey-form - Add to your project reducers and sagas from redux-connect-backend module. Click here for further information
Usage of the survey form is very easy. You need to import SurveyForm component and pass to it surveyId property.
import SurveyForm from 'survey-form';
<SurveyForm surveyId={105} />You can import and watch following action types in your reducer or saga.
- FORM_SAVE_SUCCESS_ACTION - is dispatched after the form has been successfully saved
- FORM_SAVE_FAILED_ACTION - is dispatched after the form has been failed saved
- Run
yarn global add getstorybookto instal StoryBook. - Clone this repo using
git clone [email protected]:HealthByRo/survey-form.git - Run
cd survey-form/ - Run
yarnto install dependencies. - Run
yarn run storybookto start StoryBook.
- Run
cd survey-form/ - Run
yarn linkto create a symbolic link from a global folder to the survey-form/ folder. - Run
cd your-project-dir - Run
yarn link survey-form
- Run
cd your-project-dir - Run
yarn unlink survey-form - Run
yarnto install back the repo version
- Run
yarn - Commit
package.jsonandyarn.logchanges - Run
flow-typed install --overwrite - Check if
yarn flowreturns any new errors, if not, commitflow-typed/changes
- Run
git clone [email protected]:HealthByRo/react-new-component.git - Run
cd react-new-component - Run
git remote upstream add [email protected]:HealthByRo/survey-form.git - Now, after something gets updated in survey-form (PR merge, straight commit, etc), run
git fetch upstream - Run
git merge upstream/develop - Changes from upstream repository should now be present in forked repository.
