[Vuejs]-Showing changes without refreshing in VueJS

0👍

I don’t know how you get your initial data but you can have a GET request that gets fresh data from the laravel after you update/delete initial data.

With the response from that request you can update your data.schedulesDisplayed prop.

Important! You need to set the :key attribute in the div that uses v-for rendering like this

<div v-for="(schedule, index) in sortedDays(data.schedulesDisplayed)" :key="index" class="control">

I used the index for the sake of this example but you should use a unique property of sortedDays return.

Leave a comment