Created
October 11, 2017 00:18
-
-
Save McCulloughRT/6096a84ae457b264281cb0907b5db65e to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// Within your actions | |
export function setStyle(style) { | |
return { | |
type: 'SET_STYLE', | |
payload: style | |
} | |
} | |
/* ----------------------------*/ | |
// Within your reducers | |
export default function StylesheetReducer(styleState = null, action) { | |
switch(action.type){ | |
case 'SET_STYLE': { | |
return Immutable.fromJS(action.payload); | |
} | |
default: return styleState; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment