diff --git a/src/content/learn/sharing-state-between-components.md b/src/content/learn/sharing-state-between-components.md
index 149164fe1..43f10e06f 100644
--- a/src/content/learn/sharing-state-between-components.md
+++ b/src/content/learn/sharing-state-between-components.md
@@ -1,31 +1,33 @@
---
-title: Sharing State Between Components
+title: Berbagi State Antar Komponen
---
-Sometimes, you want the state of two components to always change together. To do it, remove state from both of them, move it to their closest common parent, and then pass it down to them via props. This is known as *lifting state up,* and it's one of the most common things you will do writing React code.
+Terkadang, Anda ingin dua komponen selalu berubah secara bersamaan. Untuk melakukannya, hapus *state* dari kedua komponen, pindahkan ke komponen induk terdekat, dan kemudian oper ke komponen tersebut melalui *props*. Ini dikenal sebagai *mengangkat state ke atas*, dan ini adalah salah satu hal yang paling umum yang akan Anda lakukan saat menulis kode React.
-- How to share state between components by lifting it up
-- What are controlled and uncontrolled components
+- Bagaimana cara berbagi *state* antar komponen dengan menaikkan *state* ke atas (*lifting state up*)
+- Apa itu komponen terkendali (*controlled component*) dan tak terkendali (*uncontrolled component*)
-## Lifting state up by example {/*lifting-state-up-by-example*/}
+## Contoh Mengangkat State Keatas {/*lifting-state-up-by-example*/}
-In this example, a parent `Accordion` component renders two separate `Panel`s:
+
+Pada contoh ini, komponen induk `Accordion` merender dua komponen `Panel` terpisah:
* `Accordion`
- `Panel`
- `Panel`
-Each `Panel` component has a boolean `isActive` state that determines whether its content is visible.
+Setiap komponen `Panel` memiliki *state* *boolean* `isActive` yang menentukan apakah kontennya terlihat.
+
-Press the Show button for both panels:
+Tekan tombol Tampilkan untuk kedua panel:
@@ -41,7 +43,7 @@ function Panel({ title, children }) {
-
- With a population of about 2 million, Almaty is Kazakhstan's largest city. From 1929 to 1997, it was its capital city.
+
+ Dengan populasi sekitar 2 juta, Almaty adalah kota terbesar di Kazakhstan. Dari tahun 1929 hingga 1997, itu adalah ibu kota negara tersebut.
-
- The name comes from алма, the Kazakh word for "apple" and is often translated as "full of apples". In fact, the region surrounding Almaty is thought to be the ancestral home of the apple, and the wild Malus sieversii is considered a likely candidate for the ancestor of the modern domestic apple.
+
+ Nama berasal dari алма, kata Kazakh untuk "apel" dan sering diterjemahkan sebagai "penuh dengan apel". Faktanya, wilayah sekitar Almaty dipercaya sebagai rumah leluhur apel, dan tanaman liar Malus sieversii dianggap sebagai kandidat yang mungkin untuk leluhur apel domestik modern.
>
);
@@ -73,59 +75,64 @@ h3, p { margin: 5px 0px; }
-Notice how pressing one panel's button does not affect the other panel--they are independent.
+Perhatikan bagaimana menekan tombol satu panel tidak memengaruhi panel lainnya--mereka independen.
-
+
-Initially, each `Panel`'s `isActive` state is `false`, so they both appear collapsed
+
+Awalnya, setiap `Panel` memiliki state `isActive` dengan nilai `false`, sehingga keduanya terlihat tertutup
-
+
+
-Clicking either `Panel`'s button will only update that `Panel`'s `isActive` state alone
+Menekan tombol `Panel` mana pun hanya akan memperbarui *state* `isActive` dari `Panel` itu sendiri
-**But now let's say you want to change it so that only one panel is expanded at any given time.** With that design, expanding the second panel should collapse the first one. How would you do that?
+**Tetapi sekarang katakanlah Anda ingin mengubah panel tersebut sehingga hanya satu panel yang dibuka pada satu waktu.** Dengan desain di atas, membuka panel kedua berarti secara otomatis menutup panel pertama. Bagaimanakah Anda akan melakukannya?
-To coordinate these two panels, you need to "lift their state up" to a parent component in three steps:
+Untuk mengkoordinasikan kedua panel ini, Anda perlu "mengangkat *state* mereka" ke komponen induk dalam tiga langkah:
-1. **Remove** state from the child components.
-2. **Pass** hardcoded data from the common parent.
-3. **Add** state to the common parent and pass it down together with the event handlers.
+1. **Hapus** *state* dari komponen anak.
+2. **Oper** data yang dituliskan langsung di dalam kode (*hardcoded*) dari komponen induk.
+3. **Tambahkan** *state* ke komponen induk dan oper bersamaan dengan *event handlers*.
-This will allow the `Accordion` component to coordinate both `Panel`s and only expand one at a time.
+Cara ini akan memungkinkan komponen `Accordion` untuk mengkoordinasikan kedua `Panel` dan hanya membuka satu panel pada satu waktu.
-### Step 1: Remove state from the child components {/*step-1-remove-state-from-the-child-components*/}
+### Langkah 1: Hapus state dari komponen anak {/*step-1-remove-state-from-the-child-components*/}
-You will give control of the `Panel`'s `isActive` to its parent component. This means that the parent component will pass `isActive` to `Panel` as a prop instead. Start by **removing this line** from the `Panel` component:
+
+Anda akan memberikan kontrol `isActive` dari `Panel` ke komponen induknya. Ini berarti komponen induk akan mengoper `isActive` ke `Panel` sebagai *prop*. Mulai dengan **menghapus baris ini** dari komponen `Panel`:
```js
const [isActive, setIsActive] = useState(false);
```
-And instead, add `isActive` to the `Panel`'s list of props:
+Lalu, tambahkan `isActive` ke daftar *prop* `Panel`:
```js
-function Panel({ title, children, isActive }) {
+function Panel({ title, children, isActive })
```
-Now the `Panel`'s parent component can *control* `isActive` by [passing it down as a prop.](/learn/passing-props-to-a-component) Conversely, the `Panel` component now has *no control* over the value of `isActive`--it's now up to the parent component!
+Sekarang komponen induk `Panel` dapat *mengontrol* `isActive` dengan [mengoper sebagai prop.](/learn/passing-props-to-a-component) Sebaliknya, komponen `Panel` sekarang tidak memiliki *kontrol* atas nilai `isActive`--sekarang terserah komponen induk!
+
-### Step 2: Pass hardcoded data from the common parent {/*step-2-pass-hardcoded-data-from-the-common-parent*/}
+### Langkah 2: Oper data yang dituliskan langsung di dalam kode dari komponen induk {/*step-2-pass-hardcoded-data-from-the-common-parent*/}
-To lift state up, you must locate the closest common parent component of *both* of the child components that you want to coordinate:
+Untuk mengangkat *state*, Anda harus menemukan komponen induk yang paling dekat dari *kedua* komponen anak yang ingin Anda koordinasikan:
-* `Accordion` *(closest common parent)*
+* `Accordion` *(komponen induk terdekat)*
- `Panel`
- `Panel`
-In this example, it's the `Accordion` component. Since it's above both panels and can control their props, it will become the "source of truth" for which panel is currently active. Make the `Accordion` component pass a hardcoded value of `isActive` (for example, `true`) to both panels:
+Pada contoh ini, komponen `Accordion` adalah yang terdekat. Karena komponen ini berada di atas kedua panel dan dapat mengontrol *prop* mereka, komponen ini akan menjadi "sumber kebenaran" untuk panel mana yang sedang aktif. Buat komponen `Accordion` mengoper nilai `isActive` yang telah ditentukan sebelumnya (misalnya, `true`) ke kedua panel:
+
@@ -136,11 +143,11 @@ export default function Accordion() {
return (
<>
Almaty, Kazakhstan
-
- With a population of about 2 million, Almaty is Kazakhstan's largest city. From 1929 to 1997, it was its capital city.
+
+ Dengan populasi sekitar 2 juta, Almaty adalah kota terbesar di Kazakhstan. Dari tahun 1929 hingga 1997, itu adalah ibu kota negara tersebut.
-
- The name comes from алма, the Kazakh word for "apple" and is often translated as "full of apples". In fact, the region surrounding Almaty is thought to be the ancestral home of the apple, and the wild Malus sieversii is considered a likely candidate for the ancestor of the modern domestic apple.
+
+ Nama berasal dari алма, kata Kazakh untuk "apel" dan sering diterjemahkan sebagai "penuh dengan apel". Faktanya, wilayah sekitar Almaty dipercaya sebagai rumah leluhur apel, dan Malus sieversii si liar dianggap sebagai kandidat yang mungkin untuk leluhur apel domestik modern.
>
);
@@ -154,7 +161,7 @@ function Panel({ title, children, isActive }) {
{children}
) : (
)}
@@ -172,21 +179,23 @@ h3, p { margin: 5px 0px; }
-Try editing the hardcoded `isActive` values in the `Accordion` component and see the result on the screen.
+Coba ubah nilai `isActive` yang dituliskan langsung di dalam kode komponen `Accordion` dan lihat hasilnya di layar.
+
+### Langkah 3: Tambahkan state ke komponen induk {/*step-3-add-state-to-the-common-parent*/}
+
+Memindahkan *state* ke atas seringkali mengubah sifat dari apa yang Anda simpan sebagai *state*.
-### Step 3: Add state to the common parent {/*step-3-add-state-to-the-common-parent*/}
-Lifting state up often changes the nature of what you're storing as state.
-In this case, only one panel should be active at a time. This means that the `Accordion` common parent component needs to keep track of *which* panel is the active one. Instead of a `boolean` value, it could use a number as the index of the active `Panel` for the state variable:
+Dalam contoh ini, Anda ingin mengubah `Accordion` sehingga hanya satu panel yang dapat dibuka pada satu waktu. Ini berarti bahwa komponen induk `Accordion` perlu melacak *panel mana* yang sedang aktif. Alih-alih nilai `boolean`, ia dapat menggunakan angka sebagai indeks `Panel` aktif untuk variabel *state*:
```js
const [activeIndex, setActiveIndex] = useState(0);
```
-When the `activeIndex` is `0`, the first panel is active, and when it's `1`, it's the second one.
+Ketika `activeIndex` bernilai `0`, panel pertama aktif, dan ketika bernilai `1`, panel kedua aktif.
-Clicking the "Show" button in either `Panel` needs to change the active index in `Accordion`. A `Panel` can't set the `activeIndex` state directly because it's defined inside the `Accordion`. The `Accordion` component needs to *explicitly allow* the `Panel` component to change its state by [passing an event handler down as a prop](/learn/responding-to-events#passing-event-handlers-as-props):
+Menekan tombol "Tampilkan" di salah satu `Panel` perlu mengubah indeks aktif di `Accordion`. Sebuah `Panel` tidak dapat mengatur *state* `activeIndex` secara langsung karena ia didefinisikan di dalam `Accordion`. Komponen `Accordion` perlu *secara ekplisit mengizinkan* komponen `Panel` untuk mengubah *state*-nya dengan [mengoper *event handler* sebagai prop](/learn/responding-to-events#passing-event-handlers-as-props):
```js
<>
@@ -205,7 +214,7 @@ Clicking the "Show" button in either `Panel` needs to change the active index in
>
```
-The `