Skip to content

Instantly share code, notes, and snippets.

@rocksinghajay
Created April 8, 2019 20:38
Show Gist options
  • Save rocksinghajay/0d712772b753d4e888dae71f91e8b195 to your computer and use it in GitHub Desktop.
Save rocksinghajay/0d712772b753d4e888dae71f91e8b195 to your computer and use it in GitHub Desktop.
import SET_TEXT from '../types/types'
const initialState = {
text: '',
}
const dummyReducer = (state = initialState, action = {}) => {
switch(action.type) {
case SET_TEXT:
return { ...state, text: action.payload.data }
default:
return state;
}
}
export default dummyReducer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment