score:0

Accepted answer
async function getNews(){
  try {
    const answer = await fetch('https://newsapi.org/v2/everything?q='+ query +'&from=2022-03-01&sortBy=popularity&language=en&apiKey=')
    const data = await answer.json();
    setUserNews(data.articles)
  } catch(error) {
     console.log(error)
  }
}

Related Query

More Query from same tag