Skip to content

Instantly share code, notes, and snippets.

@chuck0523

chuck0523/slide.js

Last active Mar 20, 2016
Embed
What would you like to do?
const slide = (state = 0, action) => {
switch(action.type) {
case 'PREV_PAGE':
return action.page
case 'NEXT_PAGE':
return action.page
default:
return state
}
}
export default slide
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment