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":"The\"single source of truth\".\n\n```js\nconst store = createStore(reducer, initialState);\n```",
30
30
"tasks": [
31
31
{
32
-
"description":"install Redux. Run `npm install redux`.",
32
+
"description":"install Redux. Run `npm install--saveredux`.",
33
33
"actions": [
34
34
"open('index.js')"
35
35
],
@@ -38,7 +38,7 @@
38
38
]
39
39
},
40
40
{
41
-
"description":"import { createStore } from 'redux';",
41
+
"description":"importcreateStore. `import{ createStore } from 'redux';`",
42
42
"tests": [
43
43
"02/02"
44
44
]
@@ -55,7 +55,8 @@
55
55
"02/04"
56
56
]
57
57
}
58
-
]
58
+
],
59
+
"onPageComplete":"As you can see, the store is just an object with various methods like\"dispatch\" and\"getState\". Let's see what these methods do in the next step."
Copy file name to clipboardExpand all lines: tutorial/02/index.md
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -5,15 +5,17 @@ The "single source of truth".
5
5
conststore=createStore(reducer, initialState);
6
6
```
7
7
8
-
+ install Redux. Run`npm install redux`.
8
+
+ install Redux. Run`npm install--saveredux`.
9
9
@action(open('index.js'))
10
10
@test('02/01')
11
11
12
-
+`import { createStore } from 'redux';`
12
+
+import createStore.`import { createStore } from 'redux';`
13
13
@test('02/02')
14
14
15
15
+ create your first store and call it`store`. Use a simple "reducer" function for now, let's say`state => state`.
16
16
@test('02/03')
17
17
18
18
+ log your store to the console and have a look.
19
19
@test('02/04')
20
+
21
+
@onPageComplete('As you can see, the store is just an object with various methods like "dispatch" and "getState". Let's see what these methods do in the next step.')