Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion beta/src/pages/apis/usereducer.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ function reducer(state, action) {
}
```

Read [updating objects in state](/learn/updating-objects-in-state) and [updating arrays in state](/learn/updating-arrays-in-state) to learn more.
Read [Aktualizowanie obiektów w stanie](/learn/updating-objects-in-state) and [Aktualizowanie tablic w stanie](/learn/updating-arrays-in-state) to learn more.

</Gotcha>

Expand Down
417 changes: 209 additions & 208 deletions beta/src/pages/apis/usestate.md

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions beta/src/pages/learn/adding-interactivity.md
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ Read **[Queueing a Series of State Changes](/learn/queueing-a-series-of-state-ch

</LearnMore>

## Updating objects in state {/*updating-objects-in-state*/}
## Aktualizowanie obiektów w stanie {/*updating-objects-in-state*/}

State can hold any kind of JavaScript value, including objects. But you shouldn't change objects and arrays that you hold in the React state directly. Instead, when you want to update an object and array, you need to create a new one (or make a copy of an existing one), and then update the state to use that copy.

Expand Down Expand Up @@ -628,11 +628,11 @@ img { width: 200px; height: 200px; }

<LearnMore path="/learn/updating-objects-in-state">

Read **[Updating Objects in State](/learn/updating-objects-in-state)** to learn how to update objects correctly.
Read **[Aktualizowanie obiektów w stanie](/learn/updating-objects-in-state)** to learn how to update objects correctly.

</LearnMore>

## Updating arrays in state {/*updating-arrays-in-state*/}
## Aktualizowanie tablic w stanie {/*updating-arrays-in-state*/}

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:

Expand Down Expand Up @@ -786,7 +786,7 @@ function ItemList({ artworks, onToggle }) {

<LearnMore path="/learn/updating-arrays-in-state">

Read **[Updating Arrays in State](/learn/updating-arrays-in-state)** to learn how to update arrays correctly.
Read **[Aktualizowanie tablic w stanie](/learn/updating-arrays-in-state)** to learn how to update arrays correctly.

</LearnMore>

Expand Down
4 changes: 2 additions & 2 deletions beta/src/pages/learn/managing-state.md
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ Read **[Sharing State Between Components](/learn/sharing-state-between-component

</LearnMore>

## Preserving and resetting state {/*preserving-and-resetting-state*/}
## Utrzymywanie i resetowanie stanu {/*preserving-and-resetting-state*/}

When you re-render a component, React needs to decide which parts of the tree to keep (and update), and which parts to discard or re-create from scratch. In most cases, React's automatic behavior works well enough. By default, React preserves the parts of the tree that "match up" with the previously rendered component tree.

Expand Down Expand Up @@ -496,7 +496,7 @@ textarea {

<LearnMore path="/learn/preserving-and-resetting-state">

Read **[Preserving and Resetting State](/learn/preserving-and-resetting-state)** to learn the lifetime of state and how to control it.
Read **[Utrzymywanie i resetowanie stanu](/learn/preserving-and-resetting-state)** to learn the lifetime of state and how to control it.

</LearnMore>

Expand Down
2 changes: 1 addition & 1 deletion beta/src/pages/learn/preserving-and-resetting-state.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Preserving and Resetting State
title: Utrzymywanie i resetowanie stanu
---

<Intro>
Expand Down
2 changes: 1 addition & 1 deletion beta/src/pages/learn/updating-arrays-in-state.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Updating Arrays in State
title: Aktualizowanie tablic w stanie
---

<Intro>
Expand Down
2 changes: 1 addition & 1 deletion beta/src/pages/learn/updating-objects-in-state.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Updating Objects in State
title: Aktualizowanie obiektów w stanie
---

<Intro>
Expand Down
6 changes: 3 additions & 3 deletions beta/src/sidebarLearn.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,11 @@
"path": "/learn/queueing-a-series-of-state-updates"
},
{
"title": "Updating Objects in State",
"title": "Aktualizowanie obiektów w stanie",
"path": "/learn/updating-objects-in-state"
},
{
"title": "Updating Arrays in State",
"title": "Aktualizowanie tablic w stanie",
"path": "/learn/updating-arrays-in-state"
}
]
Expand All @@ -131,7 +131,7 @@
"path": "/learn/sharing-state-between-components"
},
{
"title": "Preserving and Resetting State",
"title": "Utrzymywanie i resetowanie stanu",
"path": "/learn/preserving-and-resetting-state"
},
{
Expand Down