implemented redux for state management

This commit is contained in:
andres alcocer
2019-03-30 16:30:05 -04:00
parent 8e22fc06d2
commit b5a263e46a
25 changed files with 699 additions and 301 deletions

View File

@@ -0,0 +1,11 @@
import { FETCH_DOCUMENTARIES } from '../actions/index';
export default function (state = {}, action) {
switch (action.type) {
case FETCH_DOCUMENTARIES:
const data = action.payload.data.results;
return { ...state, data }
default:
return state;
}
}