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.
react-redux/js/store.js

15 lines
283 B

import { createStore } from 'redux'
let comments = function(state = [], action){
switch(action.type){
case 'ADD':
return [...state, action.comment];
default:
return state
}
}
let store = createStore(comments);
export default store;