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/tutorial-tic-tac-toe.md
-37Lines changed: 0 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -337,11 +337,7 @@ import './styles.css';
337
337
importAppfrom'./App';
338
338
```
339
339
340
-
<<<<<<< HEAD
341
340
Mstari wa 1-5 unaleta vipande vyote muhimu pamoja:
342
-
=======
343
-
Lines 1-5 bring all the necessary pieces together:
344
-
>>>>>>> 2639f369946f763fff9a2572b0d7c4b9e2f83ebd
345
341
346
342
* React
347
343
* Maktaba ya React ya kuwasiliana na kivinjari cha wavuti (React DOM)
@@ -555,11 +551,7 @@ export default function Board() {
555
551
}
556
552
```
557
553
558
-
<<<<<<< HEAD
559
554
Angalia jinsi, kinyume na `div`s za kivinjari, viungo vyako `Board` na `Square` lazima vianze na herufi kubwa.
560
-
=======
561
-
Note how unlike the browser `div`s, your own components `Board` and `Square` must start with a capital letter.
562
-
>>>>>>> 2639f369946f763fff9a2572b0d7c4b9e2f83ebd
563
555
564
556
Hebu tuangalie:
565
557
@@ -907,33 +899,17 @@ body {
907
899
908
900
### React Developer Tools za {/*react-developer-tools*/}
909
901
910
-
<<<<<<< HEAD
911
902
React DevTools hukuruhusu kuangalia *props* na *state* za vipengele vyako vya React. Unaweza kupata kichupo cha React DevTools chini ya sehemu ya *browser* katika CodeSandbox:
912
903
913
904

914
905
915
906
Ili kuchunguza kipengele fulani kwenye skrini, tumia kitufe kilicho kwenye kona ya juu kushoto ya React DevTools:
916
907
917
908

918
-
=======
919
-
React Developer Tools let you check the props and the state of your React components. It is available as a [Chrome](https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi?hl=en), [Firefox](https://addons.mozilla.org/en-US/firefox/addon/react-devtools/), and [Edge](https://microsoftedge.microsoft.com/addons/detail/react-developer-tools/gpphkfbcpidddadnkolkpfckpihlkkil) browser extension.
920
-
921
-
After you install it, a new *Components* tab will appear in your browser Developer Tools for sites using React. If you're following along in CodeSandbox, you'd need to first open your sandbox preview in a new tab:
922
-
923
-

924
-
925
-
Then, on the preview page, open your browser's DevTools and find the *Components* tab:
Kwa maendeleo ya ndani (local development), React DevTools inapatikana kama [Chrome](https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi?hl=en), [Firefox](https://addons.mozilla.org/en-US/firefox/addon/react-devtools/), na [Edge](https://microsoftedge.microsoft.com/addons/detail/react-developer-tools/gpphkfbcpidddadnkolkpfckpihlkkil) *browser extension*. Isakinishe, na kichupo cha *Components* kitaonekana kwenye Zana za Watengenezaji wa kivinjari chako kwa tovuti zinazotumia React.
932
-
=======
933
-
To inspect a particular component on the screen, use the button in the top left corner of the Components tab:
934
-
935
-

936
-
>>>>>>> 2639f369946f763fff9a2572b0d7c4b9e2f83ebd
937
913
938
914
939
915
## Kukamilisha Mchezo {/*completing-the-game*/}
@@ -1117,11 +1093,7 @@ function Square({ value, onSquareClick }) {
1117
1093
}
1118
1094
```
1119
1095
1120
-
<<<<<<< HEAD
1121
1096
Sasa utaunganisha kipengele cha `onSquareClick` na function katika sehemu ya `Board` utakayoita `handleClick`. Ili kuunganisha `onSquareClick` na `handleClick`, utapita function kwa kipengele cha `onSquareClick` cha sehemu ya kwanza ya `Square`:
1122
-
=======
1123
-
Now you'll connect the `onSquareClick` prop to a function in the `Board` component that you'll name `handleClick`. To connect `onSquareClick` to `handleClick` you'll pass a function to the `onSquareClick` prop of the first `Square` component:
1124
-
>>>>>>> 2639f369946f763fff9a2572b0d7c4b9e2f83ebd
1125
1097
1126
1098
```js
1127
1099
exportdefaultfunctionBoard() {
@@ -2100,22 +2072,13 @@ export default function Game() {
2100
2072
}
2101
2073
```
2102
2074
2103
-
<<<<<<< HEAD
2104
2075
Unaweza kuona jinsi kanuni yako inavyopaswa kuonekana hapa chini. Kumbuka kwamba unapaswa kuona hitilafu katika koni ya zana za mende inayosema:
2105
-
=======
2106
-
You can see what your code should look like below. Note that you should see an error in the developer tools console that says:
2107
-
>>>>>>> 2639f369946f763fff9a2572b0d7c4b9e2f83ebd
2108
2076
2109
2077
<ConsoleBlock level="warning">
2110
2078
Warning: Each child in an array or iterator should have a unique "key" prop. Check the render method of `Game`.
2111
2079
</ConsoleBlock>
2112
-
<<<<<<< HEAD
2113
2080
2114
2081
Utarekebisha hitilafu hii katika sehemu inayofuata.
Copy file name to clipboardExpand all lines: src/content/reference/react/Fragment.md
+11-7Lines changed: 11 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,7 +38,13 @@ Wrap elements in `<Fragment>` to group them together in situations where you nee
38
38
39
39
* React does not [reset state](/learn/preserving-and-resetting-state) when you go from rendering `<><Child /></>` to `[<Child />]` or back, or when you go from rendering `<><Child /></>` to `<Child />` and back. This only works a single level deep: for example, going from `<><><Child /></></>` to `<Child />` resets the state. See the precise semantics [here.](https://gist.github.com/clemmy/b3ef00f9507909429d8aa0d3ee4f986b)
40
40
41
-
* <CanaryBadge /> If you want to pass `ref` to a Fragment, you can't use the `<>...</>` syntax. You have to explicitly import `Fragment` from `'react'` and render `<Fragment ref={yourRef}>...</Fragment>`.
41
+
**Layout methods:**
42
+
-`compareDocumentPosition(otherNode)`: Compares the document position of the Fragment with another node.
43
+
- If the Fragment has children, the native `compareDocumentPosition` value is returned.
44
+
- Empty Fragments will attempt to compare positioning within the React tree and include `Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC`.
45
+
- Elements that have a different relationship in the React tree and DOM tree due to portaling or other insertions are `Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC`.
46
+
-`getClientRects()`: Returns a flat array of `DOMRect` objects representing the bounding rectangles of all children.
47
+
-`getRootNode()`: Returns the root node containing the Fragment's parent DOM node.
42
48
43
49
---
44
50
@@ -759,12 +765,10 @@ function VisibleGroup({ onVisibilityChange, children }) {
0 commit comments