Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translate Quick Start #500

Merged
merged 35 commits into from May 11, 2023
Merged
Changes from 7 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
726e698
docs: translate title and intro
mhaidarhanif Apr 29, 2023
c9c0b27
docs: translate you will learn (toc)
mhaidarhanif Apr 29, 2023
0fc8fea
docs: use me-*render*
mhaidarhanif Apr 29, 2023
abf706b
docs: merge 'main' into translate-quick-start
mhaidarhanif Apr 30, 2023
a2917c6
docs(quick-start): creating and nesting components
mhaidarhanif Apr 30, 2023
65f9bd6
docs(quick-start): creating and nesting components
mhaidarhanif Apr 30, 2023
17d2bd1
docs(quick-start): creating and nesting components
mhaidarhanif Apr 30, 2023
3720fb9
docs(quick-start): creating and nesting components
mhaidarhanif Apr 30, 2023
55dc58b
docs(quick-start): next steps
mhaidarhanif Apr 30, 2023
8ce4d77
docs(quick-start): translate writing markup with jsx
mhaidarhanif May 1, 2023
37f8f6b
Merge branch 'main' into translate-quick-start
mhaidarhanif May 1, 2023
f22a76d
docs(quick-start): writing markup with jsx
mhaidarhanif May 1, 2023
c24f917
docs(quick-start): adding styles
mhaidarhanif May 1, 2023
b67755f
docs(quick-start): displaying data
mhaidarhanif May 1, 2023
60c8404
docs(quick-start): writing markup with jsx: revise porting
mhaidarhanif May 1, 2023
0e4b9c1
docs(quick-start): displaying data
mhaidarhanif May 7, 2023
1e760c6
docs(quick-start): conditional rendering
mhaidarhanif May 9, 2023
ee62108
docs(quick-start): markup and styles
mhaidarhanif May 10, 2023
dcaa216
docs(quick-start): tag and tags
mhaidarhanif May 10, 2023
831c97c
Merge branch 'main' into translate-quick-start
mhaidarhanif May 10, 2023
845b642
docs(quick-start): rendering lists
mhaidarhanif May 10, 2023
b2d32a9
docs(quick-start): rendering lists
mhaidarhanif May 10, 2023
002c514
docs(quick-start): rendering lists
mhaidarhanif May 10, 2023
252d99c
docs(quick-start): rendering lists
mhaidarhanif May 10, 2023
a120731
docs(quick-start): handler related words
mhaidarhanif May 10, 2023
f813541
docs(quick-start): responding to events
mhaidarhanif May 10, 2023
2353933
docs(quick-start): updating the screen
mhaidarhanif May 10, 2023
9eef9c5
docs(quick-start): using hooks
mhaidarhanif May 10, 2023
2573412
docs(quick-start): sharing data between components
mhaidarhanif May 10, 2023
d4d6992
docs(quick-start): count word
mhaidarhanif May 10, 2023
25b1867
docs(quick-start): pass & passes word
mhaidarhanif May 10, 2023
ee687a0
Merge branch 'main' into translate-quick-start
mhaidarhanif May 10, 2023
119d69e
docs(quick-start): revision
mhaidarhanif May 10, 2023
f1e976d
docs(quick-start): revision
mhaidarhanif May 11, 2023
e6301e0
Merge branch 'main' into translate-quick-start
mhaidarhanif May 11, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
32 changes: 16 additions & 16 deletions src/content/learn/index.md
@@ -1,54 +1,54 @@
---
title: Quick Start
title: Mulai Cepat
mhaidarhanif marked this conversation as resolved.
Show resolved Hide resolved
---

<Intro>

Welcome to the React documentation! This page will give you an introduction to the 80% of React concepts that you will use on a daily basis.
Selamat datang di dokumentasi React! Halaman ini akan memberikan Anda pengenalan tentang 80% konsep React yang akan Anda gunakan sehari-hari.

</Intro>

<YouWillLearn>

- How to create and nest components
- How to add markup and styles
- How to display data
- How to render conditions and lists
- How to respond to events and update the screen
- How to share data between components
- Cara membuat dan menyarangkan (*nest*) komponen-komponen
- Cara menambahkan *markup* dan penggayaan (*styles*)
mhaidarhanif marked this conversation as resolved.
Show resolved Hide resolved
- Cara menampilkan data
- Cara me-*render* kondisi dan daftar (*lists*)
mhaidarhanif marked this conversation as resolved.
Show resolved Hide resolved
- Cara merespons *events* dan memperbarui layar
- Cara berbagi data antar komponen

</YouWillLearn>

## Creating and nesting components {/*components*/}
## Membuat dan menyarangkan (nesting) komponen {/*components*/}
mhaidarhanif marked this conversation as resolved.
Show resolved Hide resolved

React apps are made out of *components*. A component is a piece of the UI (user interface) that has its own logic and appearance. A component can be as small as a button, or as large as an entire page.
Aplikasi React dibuat dari *komponen*. Komponen adalah bagian dari UI (*user interface*, antarmuka pengguna) yang memiliki logika dan tampilan tersendiri. Sebuah komponen dapat berukuran sekecil tombol, atau sebesar seluruh halaman.
mhaidarhanif marked this conversation as resolved.
Show resolved Hide resolved

React components are JavaScript functions that return markup:
Komponen React adalah fungsi JavaScript yang mengembalikan *markup*:
mhaidarhanif marked this conversation as resolved.
Show resolved Hide resolved

```js
function MyButton() {
return (
<button>I'm a button</button>
<button>Saya adalah tombol</button>
);
}
```

Now that you've declared `MyButton`, you can nest it into another component:
Sekarang setelah Anda mendeklarasikan `MyButton`, Anda dapat menyarangkannya dengan komponen lain:
mhaidarhanif marked this conversation as resolved.
Show resolved Hide resolved

```js {5}
export default function MyApp() {
return (
<div>
<h1>Welcome to my app</h1>
<h1>Selamat datang di aplikasi saya</h1>
mhaidarhanif marked this conversation as resolved.
Show resolved Hide resolved
<MyButton />
</div>
);
}
```

Notice that `<MyButton />` starts with a capital letter. That's how you know it's a React component. React component names must always start with a capital letter, while HTML tags must be lowercase.
Perhatikan bahwa `<MyButton />` dimulai dengan huruf kapital. Dengan cara itulah Anda mengetahui bahwa itu adalah sebuah komponen React. Nama komponen React harus selalu dimulai dengan huruf kapital, sedangkan *tag* HTML harus menggunakan huruf kecil.
mhaidarhanif marked this conversation as resolved.
Show resolved Hide resolved

Have a look at the result:
Lihatlah hasilnya:

<Sandpack>

Expand Down