4 ms·
> What happens if I wanted to conditionally include/not-include an <li> for the list of items? Depending on the use-case, I wouldn't want to put the conditiona
by Jarwain 7y ago
> What happens if I wanted to conditionally include/not-include an <li> for the list of items?
Depending on the use-case, I wouldn't want to put the conditional in the template.
Instead, I'd filter the array of `items`. Maybe using a computed property `filteredItems`.
The idea being, you shouldn't be putting Too Much Logic within the template.
Idk though, I started off in Vue and am very much enjoying it; I haven't spent a lot of time dabbling with React yet