I’m making a Blog site , and I have an API that has 100 article (http://jsonplaceholder.typicode.com/posts),
First I’ve fetched 10 articles by using
async function getData(url){
let data = await fetch(`${url}/?_limit=10`)
let posts = data.json();
// Then map it to show posts up
}
getData("http://jsonplaceholder.typicode.com/posts")
Now when i click Watch More button i want to fetch articles from 11 – 20 ,
How can i do that ?
fetch specific data from API
New contributor
Eshada is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.