[Vuejs]-Limiting results from Vue for-loop to only the currently used one

0👍

I guess you should look into conditional rendering

I’m assuming that when you select a certain post, only the upvoters of such post will be available

This won’t render the empty arrays :

<div v-for="p in posts" style="padding: 16px">
    <div v-if="p.usersThatUpvoted.length > 0">
        <%- partial('../../partials/upvoter') %>
    </div>                
</div>

Leave a comment