JSFiddle - React, Tailwind, and code Playground
HTML
<div id="app">
<div v-for="person in people">
{{ person.name }}
</div>
</div>
JavaScript
new Vue({
el: '#app',
data: () => ({
people: []
}),
mounted() {
fetch('https://swapi.co/api/people/')
.then((response) => {
return response.json()
.then((data) => {
this.people = data.results
})
})
.catch((error) => {
alert(error)
})
}
})