Created
March 26, 2018 07:41
-
-
Save krainboltgreene/17d466d0cc4d00582b8f661c96ed3ebb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export {default as updateInput} from "./updateInput" | |
export {default as submitAccount} from "./submitAccount" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {createStore} from "redux" | |
import reducers from "./reducers" | |
export default createStore( | |
(state, action) => reactions[action.type](state, action), | |
{} | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default function submitAccount (state, action) { | |
return state | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import mergeLeftDeep from "@unction/mergeleftdeep" | |
export default function updateInput (state, action) { | |
return mergeLeftDeep( | |
state, | |
{ | |
forms: { | |
[action.payload.form]: { | |
fields: { | |
[action.payload.field]: action.payload.value | |
} | |
} | |
} | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment