-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreducers.ts
42 lines (35 loc) · 806 Bytes
/
reducers.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import {IFollower} from '../../shared/follower';
import {combineReducers} from 'redux';
import {Actions} from './actions';
/*
2. YOUR CODE HERE
Define the reducers, first one is free.
*/
const initialUser = {
description: '',
imageSrc: '',
location: '',
name: '',
numOfFollowers: 0,
screenName: '',
url: ''
};
// HINT - use those initial values in your reducers
const initialFollowers = [];
const initialFollowersBatchIndex = -1;
const user = (state = initialUser, action) => {
switch (action.type) {
case Actions.setUser:
return action.payload;
default:
return state;
}
};
// const followers =
// const followersBatchIndex =
// UNTIL HERE
/*
3. YOUR CODE HERE
Combine your reducers and export it as 'reducers'.
*/
export const reducers = () => null;