Skip to content

Commit 95cc35d

Browse files
authored
Merge branch 'main' into sync-c7d6b700
2 parents 72e9d95 + 1e32082 commit 95cc35d

6 files changed

Lines changed: 315 additions & 749 deletions

File tree

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"remark-gfm": "^3.0.1"
4848
},
4949
"devDependencies": {
50-
"@babel/core": "^7.12.9",
50+
"@babel/core": "^7.29.6",
5151
"@babel/plugin-transform-modules-commonjs": "^7.18.6",
5252
"@babel/preset-react": "^7.18.6",
5353
"@mdx-js/mdx": "^2.1.3",
@@ -69,7 +69,7 @@
6969
"babel-eslint": "10.x",
7070
"babel-plugin-react-compiler": "^1.0.0",
7171
"chalk": "4.1.2",
72-
"esbuild": "^0.25.0",
72+
"esbuild": "^0.28.1",
7373
"eslint": "7.x",
7474
"eslint-config-next": "12.0.3",
7575
"eslint-config-react-app": "^5.2.1",
@@ -93,7 +93,7 @@
9393
"postcss-flexbugs-fixes": "4.2.1",
9494
"postcss-preset-env": "^6.7.0",
9595
"prettier": "^2.5.1",
96-
"react-server-dom-webpack": "^19.2.4",
96+
"react-server-dom-webpack": "^19.2.5",
9797
"reading-time": "^1.2.0",
9898
"remark": "^12.0.1",
9999
"remark-external-links": "^7.0.0",

src/content/learn/editor-setup.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,7 @@ Baadhi ya vihariri huja na maumbile haya yakiwa yamejengwa ndani, lakini vingine
3131

3232
### Linting {/*linting*/}
3333

34-
<<<<<<< HEAD
3534
Code linters hupata matatizo katika kodi yako unapoandika, zikikusaidia kuyarekebisha mapema. [ESLint](https://eslint.org/) ni linter maarufu ya chanzo wazi (open source) kwa ajili ya JavaScript.
36-
=======
37-
Code linters find problems in your code as you write, helping you fix them early. [ESLint](https://eslint.org/) is a popular, open source linter for JavaScript.
38-
>>>>>>> c7d6b700038c63d1aaf2c649af1aefe01ebbacac
3935

4036
* [Sakinisha ESLint kwa mpangilio uliopendekezwa kwa React](https://www.npmjs.com/package/eslint-config-react-app) (hakikisha una [Node imesakinishwa!](https://nodejs.org/en/download/current/))
4137
* [Unganisha ESLint katika VSCode na kiendelezi rasmi](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)

src/content/learn/thinking-in-react.md

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,9 @@ Anza kwa kuchora visanduku kuzunguka kila kijenzi na kijenzi kidogo kwenye kiigi
3737

3838
Kulingana na msingi wako, unaweza kufikiria kugawanya muundo katika vijenzi kwa njia tofauti:
3939

40-
<<<<<<< HEAD
4140
* **Programming**--tumia mbinu zile zile za kuamua ikiwa unapaswa kuunda kitendaji kipya au object. Mbinu moja kama hiyo ni [kanuni ya uwajibikaji mmoja (single responsibility principle)](https://en.wikipedia.org/wiki/Single_responsibility_principle), yaani, kijenzi kinapaswa kufanya jambo moja tu. Ikiwa kitaishia kukua, inapaswa kigawanywe kiwe vijenzi vidogo.
4241
* **CSS**--fikiria ni nini ungetengeneza viteule vya darasa. (Hatahivyo, vijenzi ni vidogo kwa kiasi fulani.)
4342
* **Design**--fikiria jinsi unavyoweza kupanga safu za muundo.
44-
=======
45-
* **Programming**--use the same techniques for deciding if you should create a new function or object. One such technique is the [separation of concerns](https://en.wikipedia.org/wiki/Separation_of_concerns), that is, a component should ideally only be concerned with one thing. If it ends up growing, it should be decomposed into smaller subcomponents.
46-
* **CSS**--consider what you would make class selectors for. (However, components are a bit less granular.)
47-
* **Design**--consider how you would organize the design's layers.
48-
>>>>>>> c7d6b700038c63d1aaf2c649af1aefe01ebbacac
4943

5044
Ikiwa JSON yako imeundwa vizuri, mara nyingi utapata kwamba inaelekeza kwa muundo wa vijenzi vya UI yako. Hiyo ni kwa sababu UI na miundo ya data mara nyingi huwa na usanifu sawa wa habari--yaani, umbo sawa. Tenganisha UI yako katika vijenzi, ambapo kila kijenzi kinalingana na kipande kimoja cha muundo yako wa data.
5145

@@ -232,19 +226,10 @@ Kilichobaki labda ni hali.
232226

233227
Wacha tupitie moja baada ya nyingine tena:
234228

235-
<<<<<<< HEAD
236229
1. Orodha asili ya bidhaa **imepitishwa kama vifaa, kwa hivyo haijabainishwa.**
237230
2. Maandishi ya utafutaji yanaonekana kuwa ya hali kwani yanabadilika kwa wakati na hayawezi kukokotwa kutoka kwa chochote.
238231
3. Thamani ya kisanduku cha kuteua inaonekana kuwa hali kwani inabadilika kwa wakati na haiwezi kukokotwa kutoka kwa chochote.
239232
4. Orodha iliyochujwa ya bidhaa **haijabainishwa kwa sababu inaweza kukokotwa** kwa kuchukua orodha asili ya bidhaa na kuichuja kulingana na maandishi ya utafutaji na thamani ya kisanduku cha kuteua.
240-
=======
241-
1. The original list of products is **passed in as props, so it's not state.**
242-
2. The search text seems to be state since it changes over time and can't be computed from anything.
243-
3. The value of the checkbox seems to be state since it changes over time and can't be computed from anything.
244-
4. The filtered list of products **isn't state because it can be computed** by taking the original list of products and filtering it according to the search text and value of the checkbox.
245-
246-
This means only the search text and the value of the checkbox are state! Nicely done!
247-
>>>>>>> c7d6b700038c63d1aaf2c649af1aefe01ebbacac
248233

249234
Hii ina maana kwamba ni maandishi ya utafutaji pekee na thamani ya kisanduku cha kuteua ndizo zilizotajwa! Imefanywa vizuri!
250235
<DeepDive>
@@ -277,23 +262,13 @@ In the previous step, you found two pieces of state in this application: the sea
277262

278263
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.
279264

280-
<<<<<<< HEAD
281265
Sasa wacha tupitie mkakati wetu kwao:
282266

283267
1. **Tambua vijenzi vinavyotumia hali:**
284268
* `ProductTable` inahitaji kuchuja orodha ya bidhaa kulingana na hali hiyo (maandishi ya utafutaji na thamani ya kisanduku cha kuteua).
285269
* `SearchBar` inahitaji kuonyesha hali hiyo (maandishi ya utafutaji na thamani ya kisanduku cha kuteua).
286270
1. **Tafuta mzazi wao wa kawaida:** Kijenzi mzazi cha kwanza ambacho vijenzi vyote viwili hushiriki ni `FilterableProductTable`.
287271
2. **Amua mahali pa kuishi**: Tutaweka maandishi ya kichujio na thamani za hali zilizochaguliwa katika `FilterableProductTable`.
288-
=======
289-
1. **Identify components that use state:**
290-
* `ProductTable` needs to filter the product list based on that state (search text and checkbox value).
291-
* `SearchBar` needs to display that state (search text and checkbox value).
292-
2. **Find their common parent:** The first parent component both components share is `FilterableProductTable`.
293-
3. **Decide where the state lives**: We'll keep the filter text and checked state values in `FilterableProductTable`.
294-
295-
So the state values will live in `FilterableProductTable`.
296-
>>>>>>> c7d6b700038c63d1aaf2c649af1aefe01ebbacac
297272

298273
Kwa hivyo state thamani zitaishi katika `FilterableProductTable`.
299274

@@ -481,16 +456,7 @@ function SearchBar({ filterText, inStockOnly }) {
481456
482457
Hata hivyo, bado hujaongeza msimbo wowote ili kujibu vitendo vya mtumiaji kama vile kuandika. Hii itakuwa hatua yako ya mwisho.
483458
484-
<<<<<<< HEAD
485459
## Hatua ya 5: Ongeza mtiririko wa data kinyume {/*step-5-add-inverse-data-flow*/}
486-
=======
487-
488-
## Step 5: Add inverse data flow {/*step-5-add-inverse-data-flow*/}
489-
490-
Currently your app renders correctly with props and state flowing down the hierarchy. But to change the state according to user input, you will need to support data flowing the other way: the form components deep in the hierarchy need to update the state in `FilterableProductTable`.
491-
492-
React makes this data flow explicit, but it requires a little more typing than two-way data binding. If you try to type or check the box in the example above, you'll see that React ignores your input. This is intentional. By writing `<input value={filterText} />`, you've set the `value` prop of the `input` to always be equal to the `filterText` state passed in from `FilterableProductTable`. Since `filterText` state is never set, the input never changes.
493-
>>>>>>> c7d6b700038c63d1aaf2c649af1aefe01ebbacac
494460
495461
You want to make it so whenever the user changes the form inputs, the state updates to reflect those changes. The state is owned by `FilterableProductTable`, so only it can call `setFilterText` and `setInStockOnly`. To let `SearchBar` update the `FilterableProductTable`'s state, you need to pass these functions down to `SearchBar`:
496462

src/content/learn/tutorial-tic-tac-toe.md

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -337,11 +337,7 @@ import './styles.css';
337337
import App from './App';
338338
```
339339

340-
<<<<<<< HEAD
341340
Mstari wa 1-5 unaleta vipande vyote muhimu pamoja:
342-
=======
343-
Lines 1-5 bring all the necessary pieces together:
344-
>>>>>>> c7d6b700038c63d1aaf2c649af1aefe01ebbacac
345341

346342
* React
347343
* Maktaba ya React ya kuwasiliana na kivinjari cha wavuti (React DOM)
@@ -555,11 +551,7 @@ export default function Board() {
555551
}
556552
```
557553

558-
<<<<<<< HEAD
559554
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-
>>>>>>> c7d6b700038c63d1aaf2c649af1aefe01ebbacac
563555

564556
Hebu tuangalie:
565557

@@ -907,33 +899,15 @@ body {
907899
908900
### React Developer Tools za {/*react-developer-tools*/}
909901
910-
<<<<<<< HEAD
911902
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:
912903
913904
![React DevTools katika CodeSandbox](../images/tutorial/codesandbox-devtools.png)
914905
915906
Ili kuchunguza kipengele fulani kwenye skrini, tumia kitufe kilicho kwenye kona ya juu kushoto ya React DevTools:
916907
917908
![Kuchagua vipengele kwenye ukurasa na React DevTools](../images/tutorial/devtools-select.gif)
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.
920909
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-
![opening in new tab](../images/tutorial/sandbox-new-tab.png)
924-
925-
Then, on the preview page, open your browser's DevTools and find the *Components* tab:
926-
>>>>>>> c7d6b700038c63d1aaf2c649af1aefe01ebbacac
927-
928-
![components tab](../images/tutorial/components-tab.png)
929-
930-
<<<<<<< HEAD
931910
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-
![inspecting with devtools](../images/tutorial/devtools-inspect.gif)
936-
>>>>>>> c7d6b700038c63d1aaf2c649af1aefe01ebbacac
937911
938912
939913
## Kukamilisha Mchezo {/*completing-the-game*/}
@@ -1117,11 +1091,7 @@ function Square({ value, onSquareClick }) {
11171091
}
11181092
```
11191093
1120-
<<<<<<< HEAD
11211094
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-
>>>>>>> c7d6b700038c63d1aaf2c649af1aefe01ebbacac
11251095
11261096
```js
11271097
export default function Board() {
@@ -2100,22 +2070,13 @@ export default function Game() {
21002070
}
21012071
```
21022072
2103-
<<<<<<< HEAD
21042073
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-
>>>>>>> c7d6b700038c63d1aaf2c649af1aefe01ebbacac
21082074
21092075
<ConsoleBlock level="warning">
21102076
Warning: Each child in an array or iterator should have a unique "key" prop. Check the render method of &#96;Game&#96;.
21112077
</ConsoleBlock>
2112-
<<<<<<< HEAD
21132078
21142079
Utarekebisha hitilafu hii katika sehemu inayofuata.
2115-
=======
2116-
2117-
You'll fix this error in the next section.
2118-
>>>>>>> c7d6b700038c63d1aaf2c649af1aefe01ebbacac
21192080
21202081
<Sandpack>
21212082

src/content/reference/react/use.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1120,6 +1120,7 @@ Usually, the simplest option is to `await` the Promise where you create it. The
11201120
```js
11211121
// Server Component
11221122
export default async function App() {
1123+
// Will suspend the Server Component.
11231124
const messageContent = await fetchMessage();
11241125
return <Message messageContent={messageContent} />;
11251126
}

0 commit comments

Comments
 (0)