3 ms·
I'm not sure I understand rejecting a library because it allows two-way binding. If two-way binding doesn't work for some control, nothing is stopping you from
by badthingfactory 9y ago
I'm not sure I understand rejecting a library because it allows two-way binding. If two-way binding doesn't work for some control, nothing is stopping you from falling back to one-way binding.
- Klathmon 9y agoThere's something to be said about staying as close to the "intended" way of doing things as possible with libraries. Yeah, you might be able to stick with one way binding, but anything that interacts with vue will most likely expect 2 way binding, as well as most learning resources. Updates and improvements will be made with 2 way binding in mind, and you won't have nearly as many "coded with vue in mind" tools or libraries to use. It's possible, and it might actually work out just fine. But in my experience going "against the grain" with libraries only leads to pain.
- outsidetheparty 9y agoI really haven't found this to be the case. One-way data binding is the default for just about everything in Vue; the only exception is v-model which is generally used only for form fields or similar elements where two-way binding makes sense -- two-way binding is definitely not pervasive throughout the framework as in Angular. Apps of any complexity tend to use vuex (which is a sort-of-flux-like data store) for state management.
- Klathmon 9y agoWell then it seems I'm horribly wrong here! I haven't really used Vue (only angular) and I made a bad assumption, but my point still stands in a more general form.
- outsidetheparty 9y agoOh, I totally agree with you -- I'm an Angular refugee myself. I'm genuinely surprised by how many people in this discussion seem to have such wildly incorrect impressions of what Vue is like.
- debaserab2 9y agoFor the same reason you don't buy a truck if you don't intend to haul things. You use a library that suits your workflow best.
- badthingfactory 9y agoI would say it's more like purchasing a standard transmission instead of a semi-automatic transmission because a standard transmission gives you better control on slippery roads.
- hajile 9y agoEver bad language feature gets used eventually. This is doubly true for frameworks where not only are bad features used, but also unintended and hidden features. Even if I know when to avoid 2-way binding, there is a high likelihood that someone else does not or does know, but adds a TODO because they "didn't have the time" to do it right. In my view, the best solution is to (as far as possible) eliminate questionable features from the framework and enforce good practices.