I have been working on a code that looks like this:
<template>
<div class='sights-list'>
<div v-for='(sight, index) in sights'>
<p>{{ sight.name }}</p>
</div>
</div>
</template>
<script>
import axios from 'axios'
export default {
data: function() {
return {
sights: []
}
},
methods: {
},
mounted(){
axios.get('/getSights/' + lat + '/' + lng + '/' + type)
.then(response => {
this.sights = response.data.result.results
}).catch((error) => console.log(error));
}
}
Now, I am looking to send another axios GET request once the user has scrolled through all the content generated from the initial GET request upon component mounting.
However, I am uncertain about how to determine when the user has reached the bottom of the old content after scrolling. Any suggestions on how to achieve this?