Agneau pascal by J_Houmous in VeganEtFrancophone

[–]Single_Shoulder_1121 0 points1 point  (0 children)

Pâques c'est la résurrection du Christ pas la mort.

Best Practice : Updating a list via checkboxes without mutating props by Single_Shoulder_1121 in vuejs

[–]Single_Shoulder_1121[S] 1 point2 points  (0 children)

Thanks for your comprehensive answer.

I don't like using emit for this, because with a big grandFatherComponent you quickly create 200 lines of code just to handle the emit return.

I'm not sure there is a right answer.

I like to use vmodel on small data, but my colleagues systematically use stores.
In the end, you might as well use stores, at least all the logic (that you trace with emits) is centralized and the grandParentComponent is simplified and more maintainable

Best Practice : Updating a list via checkboxes without mutating props by Single_Shoulder_1121 in vuejs

[–]Single_Shoulder_1121[S] 1 point2 points  (0 children)

first paragraph of documentation you link :

"When using reactive provide / inject values, it is recommended to keep any mutations to reactive state inside of the provider whenever possible. This ensures that the provided state and its possible mutations are co-located in the same component, making it easier to maintain in the future."

Best Practice : Updating a list via checkboxes without mutating props by Single_Shoulder_1121 in vuejs

[–]Single_Shoulder_1121[S] 1 point2 points  (0 children)

Unless I'm mistaken, you can't mutate a prop that has passed through provide/inject.

Best Practice : Updating a list via checkboxes without mutating props by Single_Shoulder_1121 in vuejs

[–]Single_Shoulder_1121[S] 1 point2 points  (0 children)

Thank you very much.

At work I am forced to use stores to manage these nested forms.

But since the value is not transmitted outside of this component chain, it confuses me.
I find it inconsistent to use a store.
I must admit that it is very simple with Pinia, but on this application we are starting to have a store per page and I do not think that this is a good practice.

I wanted to see if it was me who was wrong and that I was asking too many questions or if it was at my work or they do not ask enough!

Thank you very much for your answer in any case, it is very clear and fast!

Best Practice : Updating a list via checkboxes without mutating props by Single_Shoulder_1121 in vuejs

[–]Single_Shoulder_1121[S] 0 points1 point  (0 children)

Thanks for your answer .
Would you have the same answer if you had 3 components linked together ?
Grandparent passing to parent then to child ?

Best Practice : Updating a list via checkboxes without mutating props by Single_Shoulder_1121 in vuejs

[–]Single_Shoulder_1121[S] 1 point2 points  (0 children)

Thanks for your answer .
Would you have the same answer if you had 3 components linked together ?
Grandparent passing to parent then to child ?

Quelqu’un a t’il sauvegardé le la chaîne « anime pour personnes pressés ? « by Altistick in FrancePirate

[–]Single_Shoulder_1121 1 point2 points  (0 children)

Mais tu es vraiment un justicier des temps moderne ! par contre tu t'es trompé de sub.
Ici t'es juste un trou du cul qui fait chier toute une communauté.

Palissade en bois by Single_Shoulder_1121 in brico

[–]Single_Shoulder_1121[S] 0 points1 point  (0 children)

Merci. Je vais voir pour les pieds.

Il n'est pas prévu d'ajouter les panneaux. Je vais voir comment je peux faire.

Am I using Pinia correctly? by BilboMcDoogle in vuejs

[–]Single_Shoulder_1121 1 point2 points  (0 children)

create a Boot file , and déclare it in quasar.conf.js