Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const F2F = {
- openF2F: false,
- ...
- }
- const initialState = {
- showModal: false,
- F2F,
- ...
- }
- export default function reducer(state=initialState, action) {
- switch (action.type) {
- case psActions.ON_CHANGE:
- return {
- ...state,
- [action.fieldName]: action.value
- }
- default:
- return state
- }
- }
- export function onChangeDim(value, name, dimension) {
- return {
- type: psActions.ON_CHANGE,
- fieldName: dimension[name],//Tried many things her
- value: value
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement