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 getstorybook
to instal StoryBook. - Clone this repo using
git clone git@github.com:HealthByRo/survey-form.git
- Run
cd survey-form/
- Run
yarn
to install dependencies. - Run
yarn run storybook
to start StoryBook.
- Run
cd survey-form/
- Run
yarn link
to 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
yarn
to install back the repo version
- Run
yarn
- Commit
package.json
andyarn.log
changes - Run
flow-typed install --overwrite
- Check if
yarn flow
returns any new errors, if not, commitflow-typed/
changes
- Run
git clone git@github.com:HealthByRo/react-new-component.git
- Run
cd react-new-component
- Run
git remote upstream add git@github.com: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.