Skip to content

Commit 9d70e3d

Browse files
authored
Merge pull request #4155 from ianmcl/patch-2
Update part2d.md
2 parents 03944a7 + 4ea5a81 commit 9d70e3d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/content/2/en/part2d.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ json-server requires all data to be sent in JSON format. What this means in prac
3030
Let's make the following changes to the event handler responsible for creating a new note:
3131

3232
```js
33-
addNote = event => {
33+
const addNote = event => {
3434
event.preventDefault()
3535
const noteObject = {
3636
content: newNote,
@@ -76,7 +76,7 @@ Also the tab <i>response</i> is useful, it shows what was the data the server re
7676
The new note is not rendered to the screen yet. This is because we did not update the state of the <i>App</i> component when we created it. Let's fix this:
7777

7878
```js
79-
addNote = event => {
79+
const addNote = event => {
8080
event.preventDefault()
8181
const noteObject = {
8282
content: newNote,

0 commit comments

Comments
 (0)