JSFiddle - React, Tailwind, and code Playground
Babel + JSX
computed: {
// Fetch customers list reactively
customersList() {
if (this.customers !== '') {
return this.customers;
}
else if (window.localStorage.getItem('customersList')) {
return JSON.parse(window.localStorage.getItem('customersList'));
}
else {
return '';
}
},
}