Last active
October 14, 2016 19:47
-
-
Save talkol/2f1268c6d1e1711e6d6b7f59f5ae9413 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
| import * as types from './actionTypes'; | |
| import Immutable from 'seamless-immutable'; | |
| const initialState = Immutable({ | |
| topicsByUrl: undefined, | |
| selectedTopicUrls: [] | |
| }); | |
| export default function reduce(state = initialState, action = {}) { | |
| switch (action.type) { | |
| case types.TOPICS_FETCHED: | |
| return state.merge({ | |
| topicsByUrl: action.topicsByUrl | |
| }); | |
| default: | |
| return state; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment