After deleting items from my list, they remain visible until I manually refresh the page. How can I fix this issue?
List
<tbody>
<tr v-for="school in schools" v-bind:key="school.id">
<td>{{ school.id }}</td>
<td>{{ school.name }}</td>
<td>
<button
class="btn btn-danger"
v-on:click="deleteSchool(school.id)">
Delete
</button>
</td>
</tr>
</tbody>
Delete method
deleteSchool(id)
{
let uri = `http://localhost/schools/${id}`;
this.axios.delete(uri);
this.schools.splice(id, 1);
}
Looking for solutions!