Skip to content

Commit 6d3cb1b

Browse files
authored
Merge branch 'main' into sync-47e64bf7
2 parents 52793e9 + ae9e10a commit 6d3cb1b

5 files changed

Lines changed: 11 additions & 68 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
"postcss-flexbugs-fixes": "4.2.1",
9292
"postcss-preset-env": "^6.7.0",
9393
"prettier": "^2.5.1",
94-
"react-server-dom-webpack": "^19.2.4",
94+
"react-server-dom-webpack": "^19.2.5",
9595
"reading-time": "^1.2.0",
9696
"remark": "^12.0.1",
9797
"remark-external-links": "^7.0.0",

src/content/learn/editor-setup.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,8 @@ 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.
3635
=======
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-
>>>>>>> 47e64bf7ad81aab8bacfa791a37816ee869135eb
3936

4037
* [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/))
4138
* [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 & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,10 @@ 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.
4443
=======
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-
>>>>>>> 47e64bf7ad81aab8bacfa791a37816ee869135eb
4944

5045
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.
5146

@@ -232,19 +227,10 @@ Kilichobaki labda ni hali.
232227

233228
Wacha tupitie moja baada ya nyingine tena:
234229

235-
<<<<<<< HEAD
236230
1. Orodha asili ya bidhaa **imepitishwa kama vifaa, kwa hivyo haijabainishwa.**
237231
2. Maandishi ya utafutaji yanaonekana kuwa ya hali kwani yanabadilika kwa wakati na hayawezi kukokotwa kutoka kwa chochote.
238232
3. Thamani ya kisanduku cha kuteua inaonekana kuwa hali kwani inabadilika kwa wakati na haiwezi kukokotwa kutoka kwa chochote.
239233
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-
>>>>>>> 47e64bf7ad81aab8bacfa791a37816ee869135eb
248234

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

278264
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.
279265

280-
<<<<<<< HEAD
281266
Sasa wacha tupitie mkakati wetu kwao:
282267

283268
1. **Tambua vijenzi vinavyotumia hali:**
284269
* `ProductTable` inahitaji kuchuja orodha ya bidhaa kulingana na hali hiyo (maandishi ya utafutaji na thamani ya kisanduku cha kuteua).
285270
* `SearchBar` inahitaji kuonyesha hali hiyo (maandishi ya utafutaji na thamani ya kisanduku cha kuteua).
286271
1. **Tafuta mzazi wao wa kawaida:** Kijenzi mzazi cha kwanza ambacho vijenzi vyote viwili hushiriki ni `FilterableProductTable`.
287272
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-
>>>>>>> 47e64bf7ad81aab8bacfa791a37816ee869135eb
297273

298274
Kwa hivyo state thamani zitaishi katika `FilterableProductTable`.
299275

@@ -481,16 +457,7 @@ function SearchBar({ filterText, inStockOnly }) {
481457
482458
Hata hivyo, bado hujaongeza msimbo wowote ili kujibu vitendo vya mtumiaji kama vile kuandika. Hii itakuwa hatua yako ya mwisho.
483459
484-
<<<<<<< HEAD
485460
## 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-
>>>>>>> 47e64bf7ad81aab8bacfa791a37816ee869135eb
494461
495462
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`:
496463

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

Lines changed: 0 additions & 21 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-
>>>>>>> 47e64bf7ad81aab8bacfa791a37816ee869135eb
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-
>>>>>>> 47e64bf7ad81aab8bacfa791a37816ee869135eb
563555

564556
Hebu tuangalie:
565557

@@ -1102,11 +1094,7 @@ function Square({ value, onSquareClick }) {
11021094
}
11031095
```
11041096
1105-
<<<<<<< HEAD
11061097
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`:
1107-
=======
1108-
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:
1109-
>>>>>>> 47e64bf7ad81aab8bacfa791a37816ee869135eb
11101098
11111099
```js
11121100
export default function Board() {
@@ -2085,22 +2073,13 @@ export default function Game() {
20852073
}
20862074
```
20872075
2088-
<<<<<<< HEAD
20892076
Unaweza kuona jinsi kanuni yako inavyopaswa kuonekana hapa chini. Kumbuka kwamba unapaswa kuona hitilafu katika koni ya zana za mende inayosema:
2090-
=======
2091-
You can see what your code should look like below. Note that you should see an error in the developer tools console that says:
2092-
>>>>>>> 47e64bf7ad81aab8bacfa791a37816ee869135eb
20932077
20942078
<ConsoleBlock level="warning">
20952079
Warning: Each child in an array or iterator should have a unique "key" prop. Check the render method of &#96;Game&#96;.
20962080
</ConsoleBlock>
2097-
<<<<<<< HEAD
20982081
20992082
Utarekebisha hitilafu hii katika sehemu inayofuata.
2100-
=======
2101-
2102-
You'll fix this error in the next section.
2103-
>>>>>>> 47e64bf7ad81aab8bacfa791a37816ee869135eb
21042083
21052084
<Sandpack>
21062085

yarn.lock

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5211,9 +5211,9 @@ lodash.truncate@^4.4.2:
52115211
integrity sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=
52125212

52135213
lodash@^4.17.15, lodash@^4.17.20:
5214-
version "4.17.23"
5215-
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.23.tgz#f113b0378386103be4f6893388c73d0bde7f2c5a"
5216-
integrity sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w==
5214+
version "4.18.1"
5215+
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.18.1.tgz#ff2b66c1f6326d59513de2407bf881439812771c"
5216+
integrity sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==
52175217

52185218
log-update@^4.0.0:
52195219
version "4.0.0"
@@ -6482,9 +6482,9 @@ path-parse@^1.0.6, path-parse@^1.0.7:
64826482
integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==
64836483

64846484
path-to-regexp@~0.1.12:
6485-
version "0.1.12"
6486-
resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.12.tgz#d5e1a12e478a976d432ef3c58d534b9923164bb7"
6487-
integrity sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==
6485+
version "0.1.13"
6486+
resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.13.tgz#9b22ec16bc3ab88d05a0c7e369869421401ab17d"
6487+
integrity sha512-A/AGNMFN3c8bOlvV9RreMdrv7jsmF9XIfDeCd87+I8RNg6s78BhJxMu69NEMHBSJFxKidViTEdruRwEk/WIKqA==
64886488

64896489
path-type@^3.0.0:
64906490
version "3.0.0"
@@ -7045,10 +7045,10 @@ react-remove-scroll@2.5.5:
70457045
use-callback-ref "^1.3.0"
70467046
use-sidecar "^1.1.2"
70477047

7048-
react-server-dom-webpack@^19.2.4:
7049-
version "19.2.4"
7050-
resolved "https://registry.yarnpkg.com/react-server-dom-webpack/-/react-server-dom-webpack-19.2.4.tgz#2c0e5d3b4be09428a1e5fb25bde7d00e804ef4f4"
7051-
integrity sha512-zEhkWv6RhXDctC2N7yEUHg3751nvFg81ydHj8LTTZuukF/IF1gcOKqqAL6Ds+kS5HtDVACYPik0IvzkgYXPhlQ==
7048+
react-server-dom-webpack@^19.2.5:
7049+
version "19.2.5"
7050+
resolved "https://registry.yarnpkg.com/react-server-dom-webpack/-/react-server-dom-webpack-19.2.5.tgz#b16c0bd15e6cb469bab952f367f8ceaaebe11206"
7051+
integrity sha512-bYhdd2cZJhXHqyJBoloYaJrn8MrL9Egf3ZZVn0OrIODCCORm2goFD7C+xszf6xgfsSJi0rtgB/ichcuHfkJ4yQ==
70527052
dependencies:
70537053
acorn-loose "^8.3.0"
70547054
neo-async "^2.6.1"

0 commit comments

Comments
 (0)