Skip to content

PR: Halaman State Management #73

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

Merged
merged 5 commits into from
Mar 9, 2019
Merged

Conversation

Bbw0706
Copy link

@Bbw0706 Bbw0706 commented Mar 8, 2019

No description provided.

@Bbw0706
Copy link
Author

Bbw0706 commented Mar 8, 2019

@mazipan @nusendra bisa di cek mas

@mazipan mazipan mentioned this pull request Mar 8, 2019
@mazipan mazipan changed the title ready review PR: Halaman State Management Mar 8, 2019
@Bbw0706
Copy link
Author

Bbw0706 commented Mar 8, 2019

oke sudah saya commit updatenya mas

@andriawan
Copy link

selebihnya tunggu feedback mas @mazipan dan @nusendra mas @Bbw0706


<div class="vue-mastery"><a href="https://www.vuemastery.com/courses/mastering-vuex/intro-to-vuex/" target="_blank" rel="noopener" title="Vuex Tutorial">Watch a video explanation on Vue Mastery</a></div>
<div class="vue-mastery"><a href="https://www.vuemastery.com/courses/mastering-vuex/intro-to-vuex/" target="_blank" rel="noopener" title="Vuex Tutorial">Lihatlah sebuah video yang menjelaskan tentang Vue Mastery</a></div>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tonton video penjelasan di Vue Mastery


If you're coming from React, you may be wondering how vuex compares to [redux](https://github.com/reactjs/redux), the most popular Flux implementation in that ecosystem. Redux is actually view-layer agnostic, so it can easily be used with Vue via [simple bindings](https://yarnpkg.com/en/packages?q=redux%20vue&p=1). Vuex is different in that it _knows_ it's in a Vue app. This allows it to better integrate with Vue, offering a more intuitive API and improved development experience.
Jika kamu pernah menggunakan React, kamu mungkin ingin tahu perbandingan vuex dan [redux](https://github.com/reactjs/redux), Libary untuk implementasi Flux yang paling populer. Redux sebenarnya hanya sebatas lapisan tampilan saja, jadi bisa digunakan bersama Vue dengan mudah dengan cara via [simple bindings](https://yarnpkg.com/en/packages?q=redux%20vue&p=1). Vuex berbeda karna ia langsung terhubung dengan Aplikasi milik Vue. Jadi karna ini ia terintegrasi lebih baik dengan Vue, dan juga Vuex menawarkan API yang lebih intuitif dan meningkatkan pengalaman pengembangan.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Library -> Pustaka

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Redux sebenarnya tidak tergantung pada suatu lapisan tampilan

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dengan cara via -> dengan cara

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

simple binding -> binding sederhana

@mazipan
Copy link
Member

mazipan commented Mar 9, 2019

Masih banyak kalimat yang susah dipahami maksudnya, bisa minta tolong coba dibaca ulang dari awal sampai akhir. Buat mastiin maksudnya nyampe ke pembaca


As we continue developing the convention where components are never allowed to directly mutate state that belongs to a store, but should instead dispatch events that notify the store to perform actions, we eventually arrive at the [Flux](https://facebook.github.io/flux/) architecture. The benefit of this convention is we can record all state mutations happening to the store and implement advanced debugging helpers such as mutation logs, snapshots, and history re-rolls / time travel.
Saat kita melanjutkan pengembangan ketentuannya dimana component tidak boleh merubah state yang dimiliki oleh store secara langsung, tapi sebagai gantinya kita harus mengirim event untuk memberitahu store untuk menjalankan action, akhirnya kami bertemu dengan [Flux](https://facebook.github.io/flux/) arsiktektur. Keuntungan menggunakan ketentuan ini adalah kita bisa merekam semua perubahan state yang terjadi pada store dan sudah terimplement alat debugging seperti catatan perubahan, snapshot/potretan, dan bisa melakukan pengulangan sejarah/perjalanan waktu
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Enaknya dikasih koma.
Saat kita melanjutkan pengembangan, ada ketentuan dimana komponen....

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

component -> komponen
merubah -> mengubah

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

terimplement -> terpasang

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alat debugging -> alat debug


## Simple State Management from Scratch
## Pengelolaan State dari Awal Dengan Mudah
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pengelolaan State Sederhana dari Awal

@@ -30,9 +30,9 @@ const vmB = new Vue({
})
```

Now whenever `sourceOfTruth` is mutated, both `vmA` and `vmB` will update their views automatically. Subcomponents within each of these instances would also have access via `this.$root.$data`. We have a single source of truth now, but debugging would be a nightmare. Any piece of data could be changed by any part of our app at any time, without leaving a trace.
Sekarang saat `Sumber Kebenaran` dirubah, kedua `vmA` dan `vmB` akan merubah tampilan mereka secara otomatis. Subcomponents dalam beberapa instance ini juga perlu mengaksesnya dengan `this.$root.$data`. Sekarang kita punya satu sumber kebenaran, namun melakukan debugging akan sangat sulit sekali. Setiap bagian dari data bisa berubah dengan setiap bagian dari aplikasi kita setiap waktunya, tanpa meninggalkan bekas.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sourceOfTruth gak boleh diterjemahkan disini

Copy link
Member

@nusendra nusendra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Banyak kata kata / kalimat yang masih kaku (ala ala google translate) dan perlu untuk di terjemahkan secara natural indonesia
  • Masih banyak versi inggris yang engga italic
  • Beberapa ada typo, seperti karna => karena
  • Kamu => Anda

Sudah saya beri suggestion yang benar, silakan diganti sesuai dengan itu. Thanks mas :-)

Copy link
Member

@nusendra nusendra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ada beberapa yang perlu diubah. Dikit lagi mas

@Bbw0706
Copy link
Author

Bbw0706 commented Mar 9, 2019

oke sudah di push mas @nusendra

@nusendra
Copy link
Member

nusendra commented Mar 9, 2019

aku udah sip mas @Bbw0706 . Nunggu review nya mas @mazipan

@nusendra nusendra merged commit 5920047 into vuejs-id:master Mar 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants