You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
import { createStore } from 'redux'
|
|
|
|
let comments = function(state = [], action){
|
|
switch(action.type){
|
|
case 'ADD':
|
|
return [...state, action.comment];
|
|
case 'SET':
|
|
return action.comments
|
|
default:
|
|
return state
|
|
}
|
|
}
|
|
|
|
let store = createStore(comments);
|
|
|
|
export default store;
|