mirror of
https://github.com/foomo/foomo-docs.git
synced 2025-10-16 12:35:40 +00:00
Add semicolon
This commit is contained in:
parent
2b432e4f1f
commit
22a55fa6e7
@ -7,7 +7,7 @@ JavaScript spread syntax `(...)` is a surprisingly powerful construct. It has tw
|
|||||||
Spreading creates new instances of objects or array, but we need to be very careful because it only does a shallow copy.
|
Spreading creates new instances of objects or array, but we need to be very careful because it only does a shallow copy.
|
||||||
If you have a deeply nested object or array, nested entities will still hold a reference to an original value and hence dangerous bugs can occur.
|
If you have a deeply nested object or array, nested entities will still hold a reference to an original value and hence dangerous bugs can occur.
|
||||||
|
|
||||||
Copying is needed when doing state changes (either local or state management e.g. Redux). If deep cloning is required [`structuredClone`](https://developer.mozilla.org/en-US/docs/Web/API/structuredClone) can be used.
|
Copying is needed when doing state changes (either local or state management e.g. Redux). If deep cloning is required, [`structuredClone`](https://developer.mozilla.org/en-US/docs/Web/API/structuredClone) can be used.
|
||||||
|
|
||||||
```jsx live
|
```jsx live
|
||||||
function () {
|
function () {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user