Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- export const formState = {
- progress: {
- groupId: 3,
- questionId: 5,
- },
- content: [
- {
- group: { id: 1, name: 'Company', description: 'Data regarding your company.', questions: 2 },
- questions: [
- {
- id: 1,
- type: 'textField',
- label: 'Required *',
- inputLabelProps: { shrink: true },
- text: 'group 1 question 1',
- answer: '',
- },
- ...
- ...
- ...
- ]
- }
- const mapStateToProps = (state) => {
- console.log(state);
- return {
- progress: getProgressData(state),
- content: getContentData(state),
- };
- };
- switch (action.type) {
- case UPDATE_PROGRESS:
- formState = state.get('formState');
- formState.progress = action.payload;
- console.log(formState);
- return state
- .set('formState', formState);
Add Comment
Please, Sign In to add comment