Displaying a conflict marker I'm displaying a conflict marker for each actor for each day, if the current day is in their conflicts:

&lt;li v-for="date in next_three_months"&gt;
  &lt;template v-for="actor in cast"&gt;
    &lt;template v-for="conflict in actor.conflicts"&gt;
      &lt;i v-if="date.datestamp==conflict.datestamp" class="is-conflict"&gt;&lt;/i&gt;
    &lt;/template&gt;
  &lt;/template&gt;
&lt;/li&gt;


This works, but it just feels like a lot of code (despite it already being a dozen or so lines shorter than how I was doing it before using Vue JS).

Here's my Vue.js:

new Vue({
  el: '#schedule-builder',

  data: {

    cast: [
      {{ cast_list }}
          {
            actor: {
              id: "{{ actor_id }}",
              name: "{{ actor_name or 'TBD' }}",
            },
            conflicts: [
              {{ conflict_calendar }}
                { datestamp: "{{ value }}" },
              {{ /conflict_calendar }}
            ],
          },
      {{ /cast_list }}
    ],

    next_three_months: [
      {
        datestamp: '{{ now | format:Y-m-d }}',
      },
      {{ loop times="90" }}
        {
          datestamp: '{{ now | modify_date:+1 day | format:Y-m-d }}',
        },
      {{ /loop }}
    ],
This post has been around for too long and I don't want it to be a zombie any longer... You haven't replied to our questions in comments but we see you have been on SE sites lately so I am going to go ahead with the code as is.

As was pointed out in comments there appears to be some type of rendering (perhaps server-side) that is mixed in with the JavaScript code, which is not declared, so I wouldn't really be able to try running the code even if I wanted to :/ I could try to dig through your StackOverflow posts to find relevant code but I don't have time for that. 



For the code you posted, it doesn't really seem like "a lot" but that depends on perspective... if you really wanted, you could abstract the code in the v-if (i.e. v-if="date.datestamp==conflict.datestamp") to a method and call it instead of having the logic in the markup.



I question whether &lt;template&gt; is the best tag to use in the for loops...While there are no restrictions on permitted content within a &lt;template&gt; tag, it seems odd to have one nested inside the other. Would a simple &lt;div&gt; suffice for one or both?