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

Traduction de structure.md #10

Merged
merged 2 commits into from
May 20, 2017
Merged

Traduction de structure.md #10

merged 2 commits into from
May 20, 2017

Conversation

MachinisteWeb
Copy link
Member

On commence cette relecture !

Signed-off-by: Bruno Lesieur <bruno.lesieur@gmail.com>
@MachinisteWeb MachinisteWeb self-assigned this May 20, 2017
Copy link
Member Author

@MachinisteWeb MachinisteWeb left a comment

Choose a reason for hiding this comment

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

Mes retours sur structure.md


Vuex doesn't really restrict how you structure your code. Rather, it enforces a set of high-level principles:
Vuex ne vous restreint pas vraiment dans la façon dont vous voulez structurer votre code. Il impose plutôt un set de principes de haut niveau :
Copy link
Member Author

@MachinisteWeb MachinisteWeb May 20, 2017

Choose a reason for hiding this comment

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

Vuex ne vous restreint pas quand à la structure de code à utiliser.

Il impose plutôt de respecter des principes de haut niveau


1. Application-level state is centralized in the store.
1. Le state d'application est centralisé dans le store.
Copy link
Member Author

Choose a reason for hiding this comment

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

L'état de l'application


2. The only way to mutate the state is by committing **mutations**, which are synchronous transactions.
2. La seule façon de muter le state est de commiter des **mutations**, qui sont des transactions synchrones.
Copy link
Member Author

Choose a reason for hiding this comment

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

muter l'état

est d'acter des


As long as you follow these rules, it's up to you how to structure your project. If your store file gets too big, simply start splitting the actions, mutations and getters into separate files.
Tant que vous suivez ces règles, c'est à vous de structurer votre projet. Si votre fichier de store devient trop gros, commencez simplement par séparer les actions, mutations et getters dans des fichiers séparés.
Copy link
Member Author

Choose a reason for hiding this comment

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

commencez dès lors à séparer les actions, mutations et accesseurs

├── mutations.js # root mutations
├── index.js # Là où l'on assemble nos modules et exportons le store
├── actions.js # Actions racine
├── mutations.js # Mutations racine
└── modules
   ├── cart.js # cart module
   └── products.js # products module
Copy link
Member Author

Choose a reason for hiding this comment

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

À traduire

└── modules
   ├── cart.js # cart module
   └── products.js # products module
```

As a reference, check out the [Shopping Cart Example](https://github.com/vuejs/vuex/tree/dev/examples/shopping-cart).
Vous pouvez jeter à un œil à [l'exemple Shopping Cart](https://github.com/vuejs/vuex/tree/dev/examples/shopping-cart).
Copy link
Member Author

Choose a reason for hiding this comment

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

Signed-off-by: Bruno Lesieur <bruno.lesieur@gmail.com>
@MachinisteWeb MachinisteWeb merged commit c11e884 into working May 20, 2017
@MachinisteWeb MachinisteWeb deleted the structure branch May 20, 2017 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants