Skip to content

Commit 1a948f3

Browse files
committed
recap
1 parent 2cb6690 commit 1a948f3

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/content/learn/state-as-a-snapshot.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -310,13 +310,13 @@ A co, jeśli chcesz odczytać najnowszy stan przed ponownym renderowaniem? Wtedy
310310

311311
<Recap>
312312

313-
* Setting state requests a new render.
314-
* React stores state outside of your component, as if on a shelf.
315-
* When you call `useState`, React gives you a snapshot of the state *for that render*.
316-
* Variables and event handlers don't "survive" re-renders. Every render has its own event handlers.
317-
* Every render (and functions inside it) will always "see" the snapshot of the state that React gave to *that* render.
318-
* You can mentally substitute state in event handlers, similarly to how you think about the rendered JSX.
319-
* Event handlers created in the past have the state values from the render in which they were created.
313+
* Ustawienie stanu żąda nowego renderowania.
314+
* React przechowuje stan poza komponentem, jakby na półce.
315+
* Kiedy wywołujesz `useState`, React daje ci migawkę stanu *dla tego renderowania*.
316+
* Zmienne i procedury obsługi zdarzeń nie "przetrwają" ponownego renderowania. Każde renderowanie ma własne procedury obsługi.
317+
* Każde renderowanie (i funkcje wewnątrz niego) zawsze "widzą" migawkę stanu, którą React przekazał *temu* renderowaniu.
318+
* Możesz w myślach podstawiać stan w procedurach obsługi zdarzeń, podobnie jak myślisz o wyrenderowanym JSX.
319+
* Procedury obsługi zdarzeń utworzone w przeszłości mają wartości stanu z renderowania, w którym zostały utworzone.
320320

321321
</Recap>
322322

0 commit comments

Comments
 (0)