How to do it...

You will build a website for ordering pizzas on Mt. Everest. The area has notoriously poor Internet connection, so we may want to retry a couple of times before giving up on our pizza.

This is what our HTML looks like:

<div id="app">   <h3>Everest pizza delivery</h3>   <button @click="order"            :disabled="inProgress">Order pizza!</button>   <span class="spinner" v-show="inProgress"></span>   <h4>Pizza wanted</h4>   <p>{{requests}}</p>   <h4>Pizzas ordered</h4>   <span v-for="pizza in responses">     {{pizza.id}}:{{pizza.req}}   </span> </div>

We have a button to place orders that will be disabled while an order is in progress--a list of ...

Get Vue.js 2 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.