Skip to content

Commit 36e9fe8

Browse files
committed
6a fix
1 parent 38bb3ea commit 36e9fe8

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

src/content/6/en/part6a.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1206,8 +1206,8 @@ const App = () => {
12061206
return (
12071207
<div>
12081208
<h2>Anecdotes</h2>
1209-
<AnecdoteForm />
12101209
<AnecdoteList />
1210+
<AnecdoteForm />
12111211
</div>
12121212
)
12131213
}

src/content/6/en/part6b.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -180,15 +180,12 @@ ReactDOM.createRoot(document.getElementById('root')).render(
180180

181181
Since our application breaks completely at this point, we render an empty <i>div</i> element instead of the <i>App</i> component.
182182

183-
184183
The state of the store gets printed to the console:
185184

186185
![devtools console showing notes array data](../../images/6/4e.png)
187186

188-
189187
As we can see from the output, the store has the exact shape we wanted it to!
190188

191-
192189
Let's take a closer look at how the combined reducer is created:
193190

194191
```js
@@ -198,10 +195,8 @@ const reducer = combineReducers({
198195
})
199196
```
200197

201-
202198
The state of the store defined by the reducer above is an object with two properties: <i>notes</i> and <i>filter</i>. The value of the <i>notes</i> property is defined by the <i>noteReducer</i>, which does not have to deal with the other properties of the state. Likewise, the <i>filter</i> property is managed by the <i>filterReducer</i>.
203199

204-
205200
Before we make more changes to the code, let's take a look at how different actions change the state of the store defined by the combined reducer. Let's add the following to the <i>index.js</i> file:
206201

207202
```js

0 commit comments

Comments
 (0)