JSFiddle - React, Tailwind, and code Playground
JavaScript
<template>
<div>
<h1 v-for="me in schema"> {{me.name}}</h1>
</div>
</template>
<script>
import axios from 'axios'
export default {
name: 'happy',
data () {
return {
schema: []
}
},
created: function(){
this.get_them();
},
methods: {
get_them: function(){
axios.get('https://restcountries.eu/rest/v2/all').then((response) => {
this.schema = response.data;
}).catch((error) => {
console.log("error occured");
console.log(error);
});
}
},
computed: {
}
}
</script>