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
Shallow rendering depends on React internals and can block you from future upgrades. We recommend migrating your tests to [@testing-library/react](https://testing-library.com/docs/react-testing-library/intro/) or [@testing-library/react-native](https://callstack.github.io/react-native-testing-library/docs/getting-started).
356
+
Shallow rendering depends on React internals and can block you from future upgrades. We recommend migrating your tests to [@testing-library/react](https://testing-library.com/docs/react-testing-library/intro/) or [@testing-library/react-native](https://testing-library.com/docs/react-native-testing-library/intro).
357
357
358
358
</Note>
359
359
@@ -524,7 +524,7 @@ We are deprecating `react-test-renderer` because it implements its own renderer
524
524
525
525
The test renderer was created before there were more viable testing strategies available like [React Testing Library](https://testing-library.com), and we now recommend using a modern testing library instead.
526
526
527
-
In React 19, `react-test-renderer` logs a deprecation warning, and has switched to concurrent rendering. We recommend migrating your tests to [@testing-library/react](https://testing-library.com/docs/react-testing-library/intro/) or [@testing-library/react-native](https://callstack.github.io/react-native-testing-library/docs/getting-started) for a modern and well supported testing experience.
527
+
In React 19, `react-test-renderer` logs a deprecation warning, and has switched to concurrent rendering. We recommend migrating your tests to [@testing-library/react](https://testing-library.com/docs/react-testing-library/intro/) or [@testing-library/react-native](https://testing-library.com/docs/react-native-testing-library/intro) for a modern and well supported testing experience.
Copy file name to clipboardexpand all lines: src/content/community/acknowledgements.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -59,7 +59,7 @@ We'd like to recognize a few people who have made significant contributions to R
59
59
60
60
This list is not exhaustive.
61
61
62
-
We'd like to give special thanks to [Tom Occhino](https://github.com/tomocchino) and [Adam Wolff](https://github.com/wolffiex) for their guidance and support over the years. We are also thankful to all the volunteers who [translated React into other languages.](https://translations.reactjs.org/)
62
+
We'd like to give special thanks to [Tom Occhino](https://github.com/tomocchino) and [Adam Wolff](https://github.com/wolffiex) for their guidance and support over the years. We are also thankful to all the volunteers who [translated React into other languages.](https://translations.react.dev/)
Sometimes you need to add UI widgets that aren't written to React. For example, let's say you're adding a map component to your page. It has a `setZoomLevel()` method, and you'd like to keep the zoom level in sync with a `zoomLevel` state variable in your React code. Your Effect would look similar to this:
630
+
Sometimes you need to add UI widgets that aren't written in React. For example, let's say you're adding a map component to your page. It has a `setZoomLevel()` method, and you'd like to keep the zoom level in sync with a `zoomLevel` state variable in your React code. Your Effect would look similar to this:
Copy file name to clipboardexpand all lines: src/content/learn/thinking-in-react.md
+8
Original file line number
Diff line number
Diff line change
@@ -261,7 +261,15 @@ In the previous step, you found two pieces of state in this application: the sea
261
261
262
262
Katika hatua ya awali, ulipata vipande viwili vya hali katika programu hii: maandishi ya ingizo ya utafutaji, na thamani ya kisanduku cha kuteua. Katika mfano huu, daima huonekana pamoja, kwa hiyo ni mantiki kuviweka katika sehemu moja.
263
263
264
+
<<<<<<< HEAD
264
265
Sasa wacha tupitie mkakati wetu kwao:
266
+
=======
267
+
1.**Identify components that use state:**
268
+
*`ProductTable` needs to filter the product list based on that state (search text and checkbox value).
269
+
*`SearchBar` needs to display that state (search text and checkbox value).
270
+
2.**Find their common parent:** The first parent component both components share is `FilterableProductTable`.
271
+
3.**Decide where the state lives**: We'll keep the filter text and checked state values in `FilterableProductTable`.
272
+
>>>>>>> 1697ae89a3bbafd76998dd7496754e5358bc1e9a
265
273
266
274
1.**Tambua vijenzi vinavyotumia hali:**
267
275
*`ProductTable` inahitaji kuchuja orodha ya bidhaa kulingana na hali hiyo (maandishi ya utafutaji na thamani ya kisanduku cha kuteua).
Copy file name to clipboardexpand all lines: src/content/learn/tutorial-tic-tac-toe.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -1133,7 +1133,7 @@ Calling the `setSquares` function lets React know the state of the component has
1133
1133
1134
1134
<Note>
1135
1135
1136
-
JavaScript supports [closures](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Closures) which means an inner function (e.g. `handleClick`) has access to variables and functions defined in a outer function (e.g. `Board`). The `handleClick` function can read the `squares` state and call the `setSquares` method because they are both defined inside of the `Board` function.
1136
+
JavaScript supports [closures](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Closures) which means an inner function (e.g. `handleClick`) has access to variables and functions defined in an outer function (e.g. `Board`). The `handleClick` function can read the `squares` state and call the `setSquares` method because they are both defined inside of the `Board` function.
Copy file name to clipboardexpand all lines: src/content/learn/updating-objects-in-state.md
+3-1
Original file line number
Diff line number
Diff line change
@@ -57,6 +57,7 @@ This example holds an object in state to represent the current pointer position.
57
57
58
58
```js
59
59
import { useState } from'react';
60
+
60
61
exportdefaultfunctionMovingDot() {
61
62
const [position, setPosition] =useState({
62
63
x:0,
@@ -127,6 +128,7 @@ Notice how the red dot now follows your pointer when you touch or hover over the
127
128
128
129
```js
129
130
import { useState } from'react';
131
+
130
132
exportdefaultfunctionMovingDot() {
131
133
const [position, setPosition] =useState({
132
134
x:0,
@@ -377,7 +379,7 @@ Note that the `...` spread syntax is "shallow"--it only copies things one level
377
379
378
380
#### Using a single event handler for multiple fields {/*using-a-single-event-handler-for-multiple-fields*/}
379
381
380
-
You can also use the `[` and `]` braces inside your object definition to specify a property with dynamic name. Here is the same example, but with a single event handler instead of three different ones:
382
+
You can also use the `[` and `]` braces inside your object definition to specify a property with a dynamic name. Here is the same example, but with a single event handler instead of three different ones:
Copy file name to clipboardexpand all lines: src/content/reference/react-dom/preinitModule.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -51,7 +51,7 @@ The `preinitModule` function provides the browser with a hint that it should sta
51
51
52
52
#### Parameters {/*parameters*/}
53
53
54
-
*`href`: a string. The URL of the module you want to download and exeucute.
54
+
*`href`: a string. The URL of the module you want to download and execute.
55
55
*`options`: an object. It contains the following properties:
56
56
*`as`: a required string. It must be `'script'`.
57
57
*`crossOrigin`: a string. The [CORS policy](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/crossorigin) to use. Its possible values are `anonymous` and `use-credentials`.
0 commit comments