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 page dynamic attributes #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
---
title: Assignments
judul: Penugasan
---

At the heart of Svelte is a powerful system of *reactivity* for keeping the DOM in sync with your application state — for example, in response to an event.
Inti dari Svelte adalah sistem *reaktivitas* yang kuat untuk menjaga agar DOM tetap sinkron dengan status aplikasi Kamu - misalnya, sebagai respons terhadap suatu peristiwa.

To demonstrate it, we first need to wire up an event handler. Replace line 9 with this:
Untuk mendemonstrasikannya, pertama-tama Kamu perlu memasang pengendali event. Ganti baris 9 dengan ini:

```html
<button on:click={handleClick}>
```

Inside the `handleClick` function, all we need to do is change the value of `count`:
Di dalam fungsi `handleClick`, yang perlu kamu lakukan hanyalah mengubah nilai` count`:

```js
function handleClick() {
count += 1;
}
```

Svelte 'instruments' this assignment with some code that tells it the DOM will need to be updated.
Svelte 'instrumen' penugasan ini dengan beberapa kode yang memberitahukannya bahwa DOM perlu diperbarui.