Skip to content

Instantly share code, notes, and snippets.

@LukeSmetham
Created September 24, 2019 09:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save LukeSmetham/9cd5ce24f6418d72f717fa66ab9a0103 to your computer and use it in GitHub Desktop.
Save LukeSmetham/9cd5ce24f6418d72f717fa66ab9a0103 to your computer and use it in GitHub Desktop.
import { SET_UNREAD_COUNT } from './types';
const init = {
unread: 0,
};
export default (state = init, action) => {
switch (action.type) {
case SET_UNREAD_COUNT:
return { ...state, unread: action.count };
default:
return state;
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment