Skip to content

Commit fddfc98

Browse files
authored
Merge pull request #2847 from romanstetsyk/part2d-links
update links to react docs for part2d
2 parents b728079 + 5fba7f4 commit fddfc98

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/content/2/en/part2d.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ axios.put(url, note).then(response => {
233233
// ...
234234
```
235235
236-
This is not recommended because the variable <em>note</em> is a reference to an item in the <em>notes</em> array in the component's state, and as we recall we must [never mutate state directly](https://reactjs.org/docs/state-and-lifecycle.html#using-state-correctly) in React.
236+
This is not recommended because the variable <em>note</em> is a reference to an item in the <em>notes</em> array in the component's state, and as we recall we must [never mutate state directly](https://react.dev/learn/updating-objects-in-state#why-is-mutating-state-not-recommended-in-react) in React.
237237
238238
It's also worth noting that the new object _changedNote_ is only a so-called [shallow copy](https://en.wikipedia.org/wiki/Object_copying#Shallow_copy), meaning that the values of the new object are the same as the values of the old object. If the values of the old object were objects themselves, then the copied values in the new object would reference the same objects that were in the old object.
239239

0 commit comments

Comments
 (0)