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
Copy file name to clipboardExpand all lines: src/content/learn/adding-interactivity.md
+16-16Lines changed: 16 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -639,17 +639,17 @@ Przeczytaj **[Aktualizowanie obiektów w stanie](/learn/updating-objects-in-stat
639
639
640
640
## Aktualizowanie tablic w stanie {/*updating-arrays-in-state*/}
641
641
642
-
Arrays are another type of mutable JavaScript objects you can store in state and should treat as read-only. Just like with objects, when you want to update an array stored in state, you need to create a new one (or make a copy of an existing one), and then set state to use the new array:
642
+
Tablice są kolejnym rodzajem zmiennych obiektów javascriptowych, które można przechowywać w stanie i należy je traktować jako tylko do odczytu. Podobnie jak w przypadku obiektów, gdy chcesz zaktualizować tablicę przechowywaną w stanie, musisz stworzyć nową tablicę (lub skopiować istniejącą), a następnie ustawić stan, aby używał nowej tablicy:
@@ -669,8 +669,8 @@ export default function BucketList() {
669
669
670
670
return (
671
671
<>
672
-
<h1>Art Bucket List</h1>
673
-
<h2>My list of art to see:</h2>
672
+
<h1>Lista dzieł sztuki</h1>
673
+
<h2>Moja lista dzieł sztuki do zobaczenia:</h2>
674
674
<ItemList
675
675
artworks={list}
676
676
onToggle={handleToggle} />
@@ -705,7 +705,7 @@ function ItemList({ artworks, onToggle }) {
705
705
706
706
</Sandpack>
707
707
708
-
If copying arrays in code gets tedious, you can use a library like [Immer](https://github.com/immerjs/use-immer) to reduce repetitive code:
708
+
Jeśli kopiowanie tablic w kodzie staje się uciążliwe, możesz użyć biblioteki takiej jak [Immer](https://github.com/immerjs/use-immer), aby zmniejszyć ilość powtarzającego się kodu:
709
709
710
710
<Sandpack>
711
711
@@ -714,9 +714,9 @@ import { useState } from 'react';
0 commit comments