Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

redux reducer

const Reducer = (state=[],action) =>{
	switch(action.type){
      case'add':
        return [...state,action.payload]
      default:
        return state ;
    }
}
 
PREVIOUS NEXT
Tagged: #redux #reducer
ADD COMMENT
Topic
Name
9+1 =