I know it's just a piece of syntax sugar, but why not to support v-else for v-show directive?
I like the idea, but also have som reservations considering explicitness of the behaviour:
v-else that mirror this behaviour.v-else does in a particular situation. (_"Oh there's v-show, so that determines weither v-else - oh, no - it's the v-for actually!"_)(1) and (2) are obviously true.
(3) doesn't seem to be the real issue, as v-else is always a continuation of the previously defined element/directive.
Anyway, we could use a different name in case we'll come up with a better one.
This was removed in Vue 2: https://github.com/vuejs/vue/issues/2873
I couldn't find the thread where this was discussed but the cost of maintaining v-else with the extra logic was not enough for a simple syntactic sugar for v-show="condition"/v-else vs v-show="condition"/v-show="!condition". Maybe @blake-newman recall a bit better the other reasons
Most helpful comment
This was removed in Vue 2: https://github.com/vuejs/vue/issues/2873
I couldn't find the thread where this was discussed but the cost of maintaining
v-elsewith the extra logic was not enough for a simple syntactic sugar forv-show="condition"/v-elsevsv-show="condition"/v-show="!condition". Maybe @blake-newman recall a bit better the other reasons