You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
"description":"Return a new list of Pokemon after incrementing\"votes\" of the pokemon with the matching\"id\"",
12
+
"description":"import `combineReducers` from redux",
13
13
"tests": [
14
-
"05/01"
14
+
"06/01"
15
+
],
16
+
"hints": [
17
+
"Try this: `import { combineReducers } from 'redux';`"
15
18
]
16
19
},
17
20
{
18
-
"description":"Let's make a test to see that we are truly returning a new state. Wrapyour`initialState` object in a `Object.freeze`. Freeze makes an object unchangeable. And yet your reducer should still work.",
21
+
"description":"create a new `const reducers` and set it to\"reducer\". Pass\"reducers\" intoyourstore for now, instead of\"reducer\". We'll use combineReducers shortly, but let's not break the app yet.",
19
22
"tests": [
20
-
"05/02"
23
+
"06/02"
21
24
]
22
25
},
23
26
{
24
-
"description":"What if we were dealing with multiple keys on the state. We'd have to ensure that our changes return a complete new state each time. Use `Object.assign`",
27
+
"description":"We're going to create more than one reducer. They can't all be called\"reducer\", so rename your reducer 'pokemon'.",
"description":"combineReducers(), and pass in your reducer ({ pokemon })",
34
+
"tests": [
35
+
"06/04"
36
+
]
37
+
},
38
+
{
39
+
"description":"create a\"defaultPokemon\" state",
40
+
"tests": [
41
+
"06/05"
42
+
]
43
+
},
44
+
{
45
+
"description":"set the initial state of the store to an empty object",
46
+
"tests": [
47
+
"06/06"
48
+
]
49
+
},
50
+
{
51
+
"description":"pass the default state into the pokemon reducer",
52
+
"tests": [
53
+
"06/07"
54
+
]
55
+
},
56
+
{
57
+
"description":"We no longer pass the entire\"state\" inside of our reducers, only the slice of our state the reducer needs to know. Rename all references to\"state\" inside of your\"pokemon\" reducer to what it really is now:\"pokemon\".",
58
+
"tests": [
59
+
"06/08"
30
60
]
31
61
}
32
62
],
33
-
"onPageComplete":"Now that you have an idea of how reducers work. Next we can look at how to create multiple, modular reducers."
63
+
"onPageComplete":"The state remains the same as before, but now"