diff --git a/src/content/learn/tutorial-tic-tac-toe.md b/src/content/learn/tutorial-tic-tac-toe.md
index 6487e800..ec8d0f61 100644
--- a/src/content/learn/tutorial-tic-tac-toe.md
+++ b/src/content/learn/tutorial-tic-tac-toe.md
@@ -1,31 +1,31 @@
---
-title: 'Tutorial: Tic-Tac-Toe'
+title: 'Mafunzo: Tic-Tac-Toe'
---
-You will build a small tic-tac-toe game during this tutorial. This tutorial does not assume any existing React knowledge. The techniques you'll learn in the tutorial are fundamental to building any React app, and fully understanding it will give you a deep understanding of React.
+Utaunda mchezo mdogo wa tic-tac-toe wakati wa mafunzo haya. Mafunzo haya hayachukui maarifa yoyote yaliyopo ya React. Mbinu utakazojifunza katika mafunzo ni muhimu ili kuunda programu yoyote ya React, na kuielewa kikamilifu kutakupa uelewa wa kina wa React.
-This tutorial is designed for people who prefer to **learn by doing** and want to quickly try making something tangible. If you prefer learning each concept step by step, start with [Describing the UI.](/learn/describing-the-ui)
+Mafunzo haya yameundwa kwa ajili ya watu wanaopendelea **kujifunza kwa kufanya** na wanataka kujaribu haraka kufanya kitu kinachoonekana. Ikiwa unapendelea kujifunza kila dhana hatua kwa hatua, anza na [Kuelezea UI.](/learn/describing-the-ui)
-The tutorial is divided into several sections:
+Mafunzo haya yamegawanywa katika sehemu kadhaa:
-- [Setup for the tutorial](#setup-for-the-tutorial) will give you **a starting point** to follow the tutorial.
-- [Overview](#overview) will teach you **the fundamentals** of React: components, props, and state.
-- [Completing the game](#completing-the-game) will teach you **the most common techniques** in React development.
-- [Adding time travel](#adding-time-travel) will give you **a deeper insight** into the unique strengths of React.
+- [Mpanglio wa mafunzo](#setup-for-the-tutorial) utakupa **sehemu ya kuanzia** kufuata mafunzo.
+- [Muhtasari](#overview) utakufunza **misingi** ya React: vipengele, props, na hali.
+- [Kukamilisha mchezo](#completing-the-game) itakufundisha **mbinu za kawaida zaidi** katika maendeleo ya React.
+- [Kuongeza safari ya wakati](#adding-time-travel) itakupa **ufahamu wa kina zaidi** wa nguvu za kipekee za React.
-### What are you building? {/*what-are-you-building*/}
+### Unajenga nini? {/*what-are-you-building*/}
-In this tutorial, you'll build an interactive tic-tac-toe game with React.
+Katika mafunzo haya, utatengeneza mchezo wa tic-tac-toe unaoshirikiana na React.
-You can see what it will look like when you're finished here:
+Unaweza kuona jinsi utakavyokamilisha mradi wako hapa:
@@ -194,15 +194,15 @@ body {
-If the code doesn't make sense to you yet, or if you are unfamiliar with the code's syntax, don't worry! The goal of this tutorial is to help you understand React and its syntax.
+Ikiwa msimbo bado haukueleweki kwako, au kama haufahamu sintaksia ya msimbo huo, usijali! Lengo la mafunzo haya ni kukusaidia kuelewa React na sintaksia yake.
-We recommend that you check out the tic-tac-toe game above before continuing with the tutorial. One of the features that you'll notice is that there is a numbered list to the right of the game's board. This list gives you a history of all of the moves that have occurred in the game, and it is updated as the game progresses.
+Tunapendekeza uangalie mchezo wa tic-tac-toe hapo juu kabla ya kuendelea na mafunzo. Moja ya vipengele utakavyogundua ni kwamba kuna orodha ya namba upande wa kulia wa ubao wa mchezo. Orodha hii inakupa historia ya hatua zote zilizotokea kwenye mchezo, na inasasishwa kadri mchezo unavyoendelea.
-Once you've played around with the finished tic-tac-toe game, keep scrolling. You'll start with a simpler template in this tutorial. Our next step is to set you up so that you can start building the game.
+Baada ya kucheza na mchezo wa tic-tac-toe uliokamilika, endelea kusoma. Utaanza na kiolezo rahisi zaidi katika mafunzo haya. Hatua yetu inayofuata ni kukuweka tayari ili uanze kujenga mchezo.
-## Setup for the tutorial {/*setup-for-the-tutorial*/}
+## Mpangilio wa mafunzo {/*setup-for-the-tutorial*/}
-In the live code editor below, click **Fork** in the top-right corner to open the editor in a new tab using the website CodeSandbox. CodeSandbox lets you write code in your browser and preview how your users will see the app you've created. The new tab should display an empty square and the starter code for this tutorial.
+Katika mhariri wa msimbo wa moja kwa moja hapa chini, bonyeza **Fork** kwenye kona ya juu kulia ili kufungua kihariri katika kichupo kipya ukitumia tovuti ya CodeSandbox. CodeSandbox inakuwezesha kuandika msimbo kwenye kivinjari chako na kuona jinsi watumiaji wako watakavyoona programu uliyounda. Kichupo kipya kinapaswa kuonyesha mraba tupu na msimbo wa mwanzo kwa mafunzo haya.
@@ -261,33 +261,33 @@ body {
-You can also follow this tutorial using your local development environment. To do this, you need to:
+Unaweza pia kufuata mafunzo haya kwa kutumia mazingira yako ya maendeleo ya ndani. Kufanya hivyo, unahitaji:
-1. Install [Node.js](https://nodejs.org/en/)
-1. In the CodeSandbox tab you opened earlier, press the top-left corner button to open the menu, and then choose **Download Sandbox** in that menu to download an archive of the files locally
-1. Unzip the archive, then open a terminal and `cd` to the directory you unzipped
-1. Install the dependencies with `npm install`
-1. Run `npm start` to start a local server and follow the prompts to view the code running in a browser
+1. Sakinisha [Node.js](https://nodejs.org/en/)
+1. Katika kichupo cha CodeSandbox ulichokifungua awali, bonyeza kitufe kilichopo kona ya juu kushoto kufungua menyu, kisha chagua **Download Sandbox** katika menyu hiyo ili kupakua faili za archive kwenye kompyuta yako
+1. Fungua archive, kisha fungua terminal na `cd` hadi directory ulipozipa
+1. Sakinisha utegemezi kwa kutumia `npm install`
+1. Endesha `npm start` kuanzisha seva ya ndani na fuata maelekezo kuangalia jinsi msimbo unavyotekelezwa kwenye kivinjari
-If you get stuck, don't let this stop you! Follow along online instead and try a local setup again later.
+Ikiwa utakwama, usiruhusu hili likusumbue! Fuata mtandaoni badala yake na jaribu kuanzisha tena setup ya ndani baadaye.
-## Overview {/*overview*/}
+## Muhtasari {/*overview*/}
-Now that you're set up, let's get an overview of React!
+Sasa kwamba umejiandaa, hebu tupate muhtasari wa React!
-### Inspecting the starter code {/*inspecting-the-starter-code*/}
+### Kagua msimbo wa mwanzo {/*inspecting-the-starter-code*/}
-In CodeSandbox you'll see three main sections:
+Katika CodeSandbox utaona sehemu tatu kuu:
-
+
-1. The _Files_ section with a list of files like `App.js`, `index.js`, `styles.css` and a folder called `public`
-1. The _code editor_ where you'll see the source code of your selected file
-1. The _browser_ section where you'll see how the code you've written will be displayed
+1. Sehemu ya _Files_ na orodha ya mafaili kama `App.js`, `index.js`, `styles.css` na folda inayoitwa `public`
+1. _Kihariri cha msimbo_ ambapo utaona msimbo wa chanzo wa faili uliyouchagua
+1. Sehemu ya _kivinjari_ ambapo utaona jinsi msimbo ulioandika utakavyonyeshwa
-The `App.js` file should be selected in the _Files_ section. The contents of that file in the _code editor_ should be:
+Faili ya `App.js` inapaswa kuchaguliwa katika sehemu ya _Files_. Maudhui ya faili hiyo katika _mhariri wa msimbo_ yanapaswa kuwa:
```jsx
export default function Square() {
@@ -295,15 +295,15 @@ export default function Square() {
}
```
-The _browser_ section should be displaying a square with a X in it like this:
+Sehemu ya _kivinjari_ inapaswa kuonyesha mraba na X ndani yake kama hii:
-
+
-Now let's have a look at the files in the starter code.
+Sasa hebu tuangalie faili katika msimbo wa mwanzo.
#### `App.js` {/*appjs*/}
-The code in `App.js` creates a _component_. In React, a component is a piece of reusable code that represents a part of a user interface. Components are used to render, manage, and update the UI elements in your application. Let's look at the component line by line to see what's going on:
+Msimbo katika `App.js` unaunda _kiungo (component)_. Katika React, kiungo ni kipande cha msimbo kinachoweza kutumika tena kinachoonyeshea sehemu ya kiolesura cha mtumiaji. Viungo hutumika kutayarisha, kusimamia, na kuboresha vipengele vya UI katika programu yako. Hebu tuangalie kiungo mstari kwa mstari ili kuona kinachotokea:
```js {1}
export default function Square() {
@@ -311,7 +311,7 @@ export default function Square() {
}
```
-The first line defines a function called `Square`. The `export` JavaScript keyword makes this function accessible outside of this file. The `default` keyword tells other files using your code that it's the main function in your file.
+Mstari wa kwanza unafafanua function inayoitwa `Square`. Neno la JavaScript la `export` linaufanya function huu kupatikana nje ya faili hii. Neno la `default` linawambia faili zingine zinazotumia msimbo wako kwamba hii ndiyo function kuu katika faili yako.
```js {2}
export default function Square() {
@@ -319,15 +319,15 @@ export default function Square() {
}
```
-The second line returns a button. The `return` JavaScript keyword means whatever comes after is returned as a value to the caller of the function. `` closes the JSX element to indicate that any following content shouldn't be placed inside the button.
+Mstari wa pili unarudisha kitufe. Neno la JavaScript la `return` linamaanisha chochote kinachokuja baada ya hili kinarudishwa kama thamani kwa mtoaji wa function. `` inafunga elementi ya JSX ili kuonyesha kwamba yaliyomo mengine hayapaswi kuwekwa ndani ya kitufe hicho.
#### `styles.css` {/*stylescss*/}
-Click on the file labeled `styles.css` in the _Files_ section of CodeSandbox. This file defines the styles for your React app. The first two _CSS selectors_ (`*` and `body`) define the style of large parts of your app while the `.square` selector defines the style of any component where the `className` property is set to `square`. In your code, that would match the button from your Square component in the `App.js` file.
+Bonyeza faili inayoitwa `styles.css` katika sehemu ya _Files_ ya CodeSandbox. Faili hii inafafanua mitindo kwa programu yako ya React. Wateuzi wawili wa _CSS_ wa kwanza (`*` na `body`) wanadhibiti mtindo wa sehemu kubwa za programu yako wakati mteuzi wa `.square` unadhibiti mtindo wa kiungo chochote ambapo sifa ya `className` imesetiwa kuwa `square`. Katika msimbo wako, hiyo italingana na kitufe kutoka kwa kiungo cha Square katika faili ya `App.js`.
#### `index.js` {/*indexjs*/}
-Click on the file labeled `index.js` in the _Files_ section of CodeSandbox. You won't be editing this file during the tutorial but it is the bridge between the component you created in the `App.js` file and the web browser.
+Bonyeza faili inayoitwa `index.js` katika sehemu ya _Files_ ya CodeSandbox. Hutaedit faili hii wakati wa mafunzo, lakini ni daraja kati ya kiungo ulichokiumba katika faili ya `App.js` na kivinjari cha wavuti.
```jsx
import { StrictMode } from 'react';
@@ -337,20 +337,20 @@ import './styles.css';
import App from './App';
```
-Lines 1-5 bring all the necessary pieces together:
+Mstari wa 1-5 unaleta vipande vyote muhimu pamoja:
* React
-* React's library to talk to web browsers (React DOM)
-* the styles for your components
-* the component you created in `App.js`.
+* Maktaba ya React ya kuwasiliana na kivinjari cha wavuti (React DOM)
+* mitindo ya viungo vyako
+* kiungo ulichokiumba katika `App.js`.
-The remainder of the file brings all the pieces together and injects the final product into `index.html` in the `public` folder.
+Sehemu inayofuata ya faili inaleta vipengele vyote pamoja na kuingiza bidhaa ya mwisho katika `index.html` katika folda ya `public`.
-### Building the board {/*building-the-board*/}
+### Kujenga bodi {/*building-the-board*/}
-Let's get back to `App.js`. This is where you'll spend the rest of the tutorial.
+Tunarudi kwenye `App.js`. Hapa ndipo utakapokuwa ukitumia sehemu kubwa ya mafunzo haya.
-Currently the board is only a single square, but you need nine! If you just try and copy paste your square to make two squares like this:
+Kwa sasa bodi ni mraba mmoja tu, lakini unahitaji tisa! Ikiwa utajaribu kunakili na kubandika mraba wako ili kutengeneza mraba mbili kama hii:
```js {2}
export default function Square() {
@@ -358,7 +358,7 @@ export default function Square() {
}
```
-You'll get this error:
+Utapata kosa hili:
@@ -366,7 +366,7 @@ You'll get this error:
-React components need to return a single JSX element and not multiple adjacent JSX elements like two buttons. To fix this you can use *Fragments* (`<>` and `>`) to wrap multiple adjacent JSX elements like this:
+Viungo vya React vinahitaji kurudisha elementi moja ya JSX na sio elementi nyingi za JSX zilizo karibu kama vitufe viwili. Ili kutatua hili, unaweza kutumia *Fragments* (`<>` na `>`) ili kuzunguka elementi nyingi za JSX zilizo karibu kama hii:
```js {3-6}
export default function Square() {
@@ -379,17 +379,17 @@ export default function Square() {
}
```
-Now you should see:
+Sasa unapaswa kuona:
-
+
-Great! Now you just need to copy-paste a few times to add nine squares and...
+Vizuri! Sasa unahitaji tu kunakili na kubandika mara kadhaa ili kuongeza mraba tisa na...
-
+
-Oh no! The squares are all in a single line, not in a grid like you need for our board. To fix this you'll need to group your squares into rows with `div`s and add some CSS classes. While you're at it, you'll give each square a number to make sure you know where each square is displayed.
+La hasha! Miraba yote iko katika mstari mmoja tu, si katika gridi kama inavyohitajika kwa bodi yetu. Ili kutatua hili, utahitaji kundi la mraba zako katika safu na `div`s na kuongeza baadhi ya madarasa ya CSS. Wakati huo huo, utampa kila mraba nambari ili kuhakikisha unajua kila mraba unapoonyeshwa.
-In the `App.js` file, update the `Square` component to look like this:
+Katika faili ya `App.js`, sasisha kiungo cha `Square` ili kiwe kama hiki:
```js {3-19}
export default function Square() {
@@ -415,11 +415,11 @@ export default function Square() {
}
```
-The CSS defined in `styles.css` styles the divs with the `className` of `board-row`. Now that you've grouped your components into rows with the styled `div`s you have your tic-tac-toe board:
+CSS iliyoainishwa katika `styles.css` inapamba `div`s zenye `className` ya `board-row`. Sasa kwamba umejumuisha viungo vyako katika safu kwa kutumia `div`s zilizopambwa, sasa una bodi yako ya tic-tac-toe:
-
+
-But you now have a problem. Your component named `Square`, really isn't a square anymore. Let's fix that by changing the name to `Board`:
+Lakini sasa una tatizo. Kiungo chako kiitwacho `Square`, kweli hakiko tena kama mraba. Hebu tufanye mabadiliko kwa kubadili jina na kuwa `Board`:
```js {1}
export default function Board() {
@@ -427,7 +427,7 @@ export default function Board() {
}
```
-At this point your code should look something like this:
+Katika hatua hii, msimbo wako unapaswa kuonekana namna hii:
@@ -504,15 +504,15 @@ body {
-Psssst... That's a lot to type! It's okay to copy and paste code from this page. However, if you're up for a little challenge, we recommend only copying code that you've manually typed at least once yourself.
+Psssst... Kuna ni mengi ya kuandika! Ni sawa kunakili na kubandika msimbo kutoka ukurasa huu. Hata hivyo, ikiwa uko tayari kwa changamoto kidogo, tunapendekeza kunakili tu msimbo ambao umekuandika mwenyewe angalau mara moja.
-### Passing data through props {/*passing-data-through-props*/}
+### Kupitisha data kupitia kwa props {/*passing-data-through-props*/}
-Next, you'll want to change the value of a square from empty to "X" when the user clicks on the square. With how you've built the board so far you would need to copy-paste the code that updates the square nine times (once for each square you have)! Instead of copy-pasting, React's component architecture allows you to create a reusable component to avoid messy, duplicated code.
+Ifuatayo, utataka kubadili thamani ya mraba kutoka tupu hadi "X" wakati mtumiaji anabofya kwenye mraba. Kwa jinsi ulivyounda bodi hadi sasa, itabidi unakili na kubandika msimbo unaosasisha mraba mara tisa (moja kwa kila mraba ulionao)! Badala ya kunakili na kubandika, usanifu wa viungo vya React unakuwezesha kuunda kiungo kinachoweza kutumika tena ili kuepuka msimbo unaojirudia.
-First, you are going to copy the line defining your first square (``) from your `Board` component into a new `Square` component:
+Kwanza, utachukua mstari unaofafanua mraba wako wa kwanza (``) kutoka kwa kiungo chako cha `Board` na kuhamisha katika kiungo kipya cha `Square`:
```js {1-3}
function Square() {
@@ -524,7 +524,7 @@ export default function Board() {
}
```
-Then you'll update the Board component to render that `Square` component using JSX syntax:
+Kisha utasasisha kiungo cha Board ili kionyeshe kiungo hicho cha `Square` kwa kutumia sintaksia ya JSX:
```js {5-19}
// ...
@@ -551,15 +551,15 @@ export default function Board() {
}
```
-Note how unlike the browser `div`s, your own components `Board` and `Square` must start with a capital letter.
+Angalia jinsi, kinyume na `div`s za kivinjari, viungo vyako `Board` na `Square` lazima vianze na herufi kubwa.
-Let's take a look:
+Hebu tuangalie:
-
+
-Oh no! You lost the numbered squares you had before. Now each square says "1". To fix this, you will use *props* to pass the value each square should have from the parent component (`Board`) to its child (`Square`).
+La hasha! Ulipoteza mraba yenye nambari ulizokuwa nazo awali. Sasa kila mraba inasema "1". Ili kutatua hili, utatumia *props* kupitisha thamani ambayo kila mraba inapaswa kuwa nayo kutoka kwa kiungo cha mzazi (`Board`) hadi kwa mtoto wake (`Square`).
-Update the `Square` component to read the `value` prop that you'll pass from the `Board`:
+Sasasisha kiungo cha `Square` ili kisome prop ya `value` ambayo utapitia kutoka kwa `Board`:
```js {1}
function Square({ value }) {
@@ -567,9 +567,9 @@ function Square({ value }) {
}
```
-`function Square({ value })` indicates the Square component can be passed a prop called `value`.
+`function Square({ value })` inaonyesha kuwa kiungo cha Mraba kinaweza kupitishiwa prop iitwayo `value`.
-Now you want to display that `value` instead of `1` inside every square. Try doing it like this:
+Sasa unataka kuonyesha hiyo `value` badala ya `1` ndani ya kila mraba. Jaribu kufanya hivyo kama hivi:
```js {2}
function Square({ value }) {
@@ -577,11 +577,11 @@ function Square({ value }) {
}
```
-Oops, this is not what you wanted:
+Ooh, hii siyo unachotaka:
-
+
-You wanted to render the JavaScript variable called `value` from your component, not the word "value". To "escape into JavaScript" from JSX, you need curly braces. Add curly braces around `value` in JSX like so:
+Ulitaka kutekeleza variable ya JavaScript iitwayo `value` kutoka kwa kiungo chako, sio neno "value". Ili "kutoroka kwenda JavaScript" kutoka kwa JSX, unahitaji mabano ya curly. Ongeza mabano ya curly kuzunguka `value` katika JSX kama hivi:
```js {2}
function Square({ value }) {
@@ -589,11 +589,11 @@ function Square({ value }) {
}
```
-For now, you should see an empty board:
+Kwa sasa, unapaswa kuona bodi tupu:
-
+
-This is because the `Board` component hasn't passed the `value` prop to each `Square` component it renders yet. To fix it you'll add the `value` prop to each `Square` component rendered by the `Board` component:
+Hii ni kwa sababu kiungo cha `Board` hakijapitisha prop ya `value` kwa kila kiungo cha `Square` kinachochora bado. Ili kutatua hili, utaongeza prop ya `value` kwa kila kiungo cha `Square` kinachochora na `Board`:
```js {5-7,10-12,15-17}
export default function Board() {
@@ -619,11 +619,11 @@ export default function Board() {
}
```
-Now you should see a grid of numbers again:
+Sasa unapaswa kuona gridi ya nambari tena:
-
+
-Your updated code should look like this:
+Msimbo wako wa sasisho unapaswa kuonekana kama huu:
@@ -702,9 +702,9 @@ body {
-### Making an interactive component {/*making-an-interactive-component*/}
+### Kutengeneza kipengele kishirikishi {/*making-an-interactive-component*/}
-Let's fill the `Square` component with an `X` when you click it. Declare a function called `handleClick` inside of the `Square`. Then, add `onClick` to the props of the button JSX element returned from the `Square`:
+Hebu tujaze kipengele cha `Square` na `X` unapoibofya. Tangaza function (function) iitwayo `handleClick` ndani ya `Square`. Kisha, ongeza `onClick` kwenye props za kipengele cha button kilichorejeshwa kutoka kwa `Square`:
```js {2-4,9}
function Square({ value }) {
@@ -723,19 +723,19 @@ function Square({ value }) {
}
```
-If you click on a square now, you should see a log saying `"clicked!"` in the _Console_ tab at the bottom of the _Browser_ section in CodeSandbox. Clicking the square more than once will log `"clicked!"` again. Repeated console logs with the same message will not create more lines in the console. Instead, you will see an incrementing counter next to your first `"clicked!"` log.
+Ukibofya mraba sasa, utaona ujumbe wa log `"clicked!"` kwenye tabo ya _Console_ chini ya sehemu ya _Browser_ katika CodeSandbox. Kubofya mraba zaidi ya mara moja kutaonyesha tena `"clicked!"`. Log zinazojirudia zenye ujumbe sawa hazitaongeza mistari zaidi kwenye console. Badala yake, utaona kaunta inayoongezeka karibu na log yako ya kwanza `"clicked!"`.
-If you are following this tutorial using your local development environment, you need to open your browser's Console. For example, if you use the Chrome browser, you can view the Console with the keyboard shortcut **Shift + Ctrl + J** (on Windows/Linux) or **Option + ⌘ + J** (on macOS).
+Ikiwa unafuata mafunzo haya kwa kutumia mazingira ya maendeleo ya ndani, unahitaji kufungua Console ya kivinjari chako. Kwa mfano, ikiwa unatumia kivinjari cha Chrome, unaweza kuona Console kwa njia ya mkato ya kibodi **Shift + Ctrl + J** (kwenye Windows/Linux) au **Option + ⌘ + J** (kwenye macOS).
-As a next step, you want the Square component to "remember" that it got clicked, and fill it with an "X" mark. To "remember" things, components use *state*.
+Hatua inayofuata, unataka kipengele cha Square "kumbuka" kuwa kilibofya, na kujaza kwa alama ya "X". Ili "kukumbuka" mambo, vipengele hutumia *hali* (*state*).
-React provides a special function called `useState` that you can call from your component to let it "remember" things. Let's store the current value of the `Square` in state, and change it when the `Square` is clicked.
+React inatoa function maalum iitwayo `useState` ambayo unaweza kuiita kutoka kwa kipengele chako ili kuifanya "ikumbuke" mambo. Hebu tuweke thamani ya sasa ya `Square` katika hali, na tuiibadilishe mraba inapobofya.
-Import `useState` at the top of the file. Remove the `value` prop from the `Square` component. Instead, add a new line at the start of the `Square` that calls `useState`. Have it return a state variable called `value`:
+Ingiza `useState` juu ya faili. Ondoa prop ya `value` kutoka kwenye kipengele cha `Square`. Badala yake, ongeza mstari mpya mwanzoni mwa `Square` unaoita `useState`. Iwe irudishe hali inayoitwa `value`:
```js {1,3,4}
import { useState } from 'react';
@@ -747,9 +747,9 @@ function Square() {
//...
```
-`value` stores the value and `setValue` is a function that can be used to change the value. The `null` passed to `useState` is used as the initial value for this state variable, so `value` here starts off equal to `null`.
+`value` huhifadhi thamani na `setValue` ni function inayoweza kutumika kubadilisha thamani. `null` inayotumwa kwa `useState` inatumika kama thamani ya awali ya hali hii, kwa hivyo `value` hapa inaanza ikiwa sawa na `null`.
-Since the `Square` component no longer accepts props anymore, you'll remove the `value` prop from all nine of the Square components created by the Board component:
+Kwa kuwa kipengele cha `Square` hakikubali tena props, utaondoa prop ya `value` kutoka kwa vipengele vyote tisa vya `Square` vilivyoundwa na kipengele cha Board:
```js {6-8,11-13,16-18}
// ...
@@ -776,7 +776,7 @@ export default function Board() {
}
```
-Now you'll change `Square` to display an "X" when clicked. Replace the `console.log("clicked!");` event handler with `setValue('X');`. Now your `Square` component looks like this:
+Sasa utabadilisha `Square` ili kuonyesha "X" inapobofya. Badilisha mshughulikaji wa tukio `console.log("clicked!");` na `setValue('X');`. Sasa kipengele chako cha `Square` kinaonekana hivi:
```js {5}
function Square() {
@@ -797,13 +797,13 @@ function Square() {
}
```
-By calling this `set` function from an `onClick` handler, you're telling React to re-render that `Square` whenever its `
-Before you can implement `jumpTo`, you need the `Game` component to keep track of which step the user is currently viewing. To do this, define a new state variable called `currentMove`, defaulting to `0`:
+Kabla hujatekeleza `jumpTo`, unahitaji kipengele cha `Game` kufuatilia ni hatua gani mchezaji anayoangalia kwa sasa. Ili kufanya hivyo, tengeneza kipengele kipya cha hali kinachoitwa `currentMove`, kilichoelea kuwa `0`:
```js {4}
export default function Game() {
@@ -2488,7 +2488,7 @@ export default function Game() {
}
```
-Next, update the `jumpTo` function inside `Game` to update that `currentMove`. You'll also set `xIsNext` to `true` if the number that you're changing `currentMove` to is even.
+Kisha, sasisha function ya `jumpTo` ndani ya `Game` ili kusasisha `currentMove`. Pia utaweka `xIsNext` kuwa `true` ikiwa nambari unayobadilisha `currentMove` kuwa ni nambari yenye uwiano wa mbili.
```js {4-5}
export default function Game() {
@@ -2501,10 +2501,10 @@ export default function Game() {
}
```
-You will now make two changes to the `Game`'s `handlePlay` function which is called when you click on a square.
+Sasa, utaleta mabadiliko mawili kwa function ya `handlePlay` ya `Game` inayoitwa unapobofya kwenye mraba.
-- If you "go back in time" and then make a new move from that point, you only want to keep the history up to that point. Instead of adding `nextSquares` after all items (`...` spread syntax) in `history`, you'll add it after all items in `history.slice(0, currentMove + 1)` so that you're only keeping that portion of the old history.
-- Each time a move is made, you need to update `currentMove` to point to the latest history entry.
+- Ikiwa "unarudi nyuma katika wakati" kisha kufanya harakati mpya kutoka kwa hatua hiyo, unataka kuhifadhi historia hadi hatua hiyo pekee. Badala ya kuongeza `nextSquares` baada ya vitu vyote (`...` sintaksia ya kueneza) katika `history`, utaongeza baada ya vitu vyote katika `history.slice(0, currentMove + 1)` ili kuhakikisha unahifadhi sehemu hiyo tu ya historia ya zamani.
+- Kila wakati harakati inapotokea, unahitaji kusasisha `currentMove` kuelekeza kwenye kipengele cha hivi karibuni cha historia.
```js {2-4}
function handlePlay(nextSquares) {
@@ -2515,7 +2515,7 @@ function handlePlay(nextSquares) {
}
```
-Finally, you will modify the `Game` component to render the currently selected move, instead of always rendering the final move:
+Mwishowe, utabadilisha kipengele cha `Game` ili kuonyesha harakati iliyochaguliwa kwa sasa, badala ya kuonyesha kila mara harakati ya mwisho:
```js {5}
export default function Game() {
@@ -2528,7 +2528,7 @@ export default function Game() {
}
```
-If you click on any step in the game's history, the tic-tac-toe board should immediately update to show what the board looked like after that step occurred.
+Ikiwa uta-bofya kwenye hatua yoyote katika historia ya mchezo, bodi ya tic-tac-toe inapaswa sasishwa mara moja kuonyesha kile kilichokuwa kwenye bodi baada ya hatua hiyo kutokea.
@@ -2699,11 +2699,11 @@ body {
-### Final cleanup {/*final-cleanup*/}
+### Kusafisha Mwisho {/*final-cleanup*/}
-If you look at the code very closely, you may notice that `xIsNext === true` when `currentMove` is even and `xIsNext === false` when `currentMove` is odd. In other words, if you know the value of `currentMove`, then you can always figure out what `xIsNext` should be.
+Ukichunguza kwa makini kanuni, utaona kuwa `xIsNext === true` wakati `currentMove` ni nambari yenye uwiano wa mbili na `xIsNext === false` wakati `currentMove` ni nambari isiyo na uwiano wa mbili. Kwa maneno mengine, ikiwa unajua thamani ya `currentMove`, basi unaweza daima kujua kile kinachopaswa kuwa `xIsNext`.
-There's no reason for you to store both of these in state. In fact, always try to avoid redundant state. Simplifying what you store in state reduces bugs and makes your code easier to understand. Change `Game` so that it doesn't store `xIsNext` as a separate state variable and instead figures it out based on the `currentMove`:
+Hakuna sababu ya kuhifadhi hizi mbili katika hali. Kwa kweli, daima jaribu kuepuka hali zinazojirudia. Kupunguza kile unachohifadhi katika hali kunapunguza hitilafu na kufanya kanuni yako kuwa rahisi kueleweka. Badilisha `Game` ili isihifadhi `xIsNext` kama kipengele cha hali kilichotenganishwa na badala yake ihesabu kwa kutegemea `currentMove`:
```js {4,11,15}
export default function Game() {
@@ -2725,20 +2725,20 @@ export default function Game() {
}
```
-You no longer need the `xIsNext` state declaration or the calls to `setXIsNext`. Now, there's no chance for `xIsNext` to get out of sync with `currentMove`, even if you make a mistake while coding the components.
+Sasa, huna haja tena ya tangazo la hali ya `xIsNext` au miito ya `setXIsNext`. Sasa, hakuna nafasi kwa `xIsNext` kutoka nje ya mfululizo na `currentMove`, hata kama utafanya makosa wakati wa kuandika vipengele.
-### Wrapping up {/*wrapping-up*/}
+### Kumalizia {/*wrapping-up*/}
-Congratulations! You've created a tic-tac-toe game that:
+Hongera! Umetengeneza mchezo wa tic-tac-toe ambao:
-- Lets you play tic-tac-toe,
-- Indicates when a player has won the game,
-- Stores a game's history as a game progresses,
-- Allows players to review a game's history and see previous versions of a game's board.
+- Unakuwezesha kucheza tic-tac-toe,
+- Unaonyesha wakati mchezaji ameshinda mchezo,
+- Unahifadhi historia ya mchezo kadri unavyosonga mbele,
+- Unaruhusu wachezaji kupitia historia ya mchezo na kuona matoleo ya zamani ya bodi ya mchezo.
-Nice work! We hope you now feel like you have a decent grasp of how React works.
+Kazi nzuri! Tunatumai sasa unahisi kama unaelewa vizuri jinsi React inavyofanya function.
-Check out the final result here:
+Tazama matokeo ya mwisho hapa:
@@ -2907,12 +2907,12 @@ body {
-If you have extra time or want to practice your new React skills, here are some ideas for improvements that you could make to the tic-tac-toe game, listed in order of increasing difficulty:
+Ikiwa una muda wa ziada au unataka kujitolea kuboresha ujuzi wako wa React, hapa kuna baadhi ya mawazo ya maboresho unayoweza kufanya kwa mchezo wa tic-tac-toe, yakiwa yameorodheshwa kwa mpangilio wa ugumu unaoongezeka:
-1. For the current move only, show "You are at move #..." instead of a button.
-1. Rewrite `Board` to use two loops to make the squares instead of hardcoding them.
-1. Add a toggle button that lets you sort the moves in either ascending or descending order.
-1. When someone wins, highlight the three squares that caused the win (and when no one wins, display a message about the result being a draw).
-1. Display the location for each move in the format (row, col) in the move history list.
+1. Kwa harakati ya sasa pekee, onyesha "Upo kwenye harakati #..." badala ya kitufe.
+1. Andika upya `Board` kutumia mizunguko miwili kutengeneza viwanja badala ya kuviandika kwa mikono.
+1. Ongeza kitufe cha kubadili kinachokuruhusu kupanga harakati kwa mpangilio wa kupanda au kushuka.
+1. Wakati mtu anashinda, angazia viwanja vitatu vilivyopunguza ushindi (na wakati hakuna anayeshinda, onyesha ujumbe kuhusu matokeo kuwa sare).
+1. Onyesha eneo la kila harakati kwa muundo (mstari, nguzo) kwenye orodha ya historia ya harakati.
-Throughout this tutorial, you've touched on React concepts including elements, components, props, and state. Now that you've seen how these concepts work when building a game, check out [Thinking in React](/learn/thinking-in-react) to see how the same React concepts work when building an app's UI.
+Katika mafunzo haya, umejifunza dhana za React ikiwemo vipengele, sehemu, props, na hali. Sasa kwamba umeona jinsi dhana hizi zinavyofanya function wakati wa kujenga mchezo, angalia [Kuwaza katika React](/learn/thinking-in-react) kuona jinsi dhana hizo za React zinavyofanya function wakati wa kujenga UI ya programu.
diff --git a/src/sidebarReference.json b/src/sidebarReference.json
index 51b6d120..2eeffc02 100644
--- a/src/sidebarReference.json
+++ b/src/sidebarReference.json
@@ -168,24 +168,6 @@
}
]
},
- {
- "title": "Directives",
- "path": "/reference/react/directives",
- "canary": true,
- "routes": [
- {
- "title": "'use client'",
- "path": "/reference/react/use-client",
- "canary": true
- },
- {
- "title": "'use server'",
- "path": "/reference/react/use-server",
- "canary": true
-
- }
- ]
- },
{
"hasSectionHeader": true,
"sectionHeader": "react-dom@{{version}}"