basic frontend demo with react and redux
This commit is contained in:
10
frontend-react/src/reducers/category.js
Normal file
10
frontend-react/src/reducers/category.js
Normal file
@@ -0,0 +1,10 @@
|
||||
import { CATEGORY_SELECT } from "constants/actionTypes";
|
||||
|
||||
export default (state = null, action) => {
|
||||
switch (action.type) {
|
||||
case CATEGORY_SELECT:
|
||||
return action.option;
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user