What you are looking for is something like this:
const [populationData, setPopulationData] = useState([]);
async function fetchData() {
fetch(
'https://datausa.io/api/data?drilldowns=Nation&measures=Population'
)
.then((res) => res.json())
.then((res) =>
setPopulationData(res.data)
);
}
useEffect(() => {
fetchData();
}, []);
When you will set populationData with setPopulationData it will trigger a re-render and you should be able to display your props in UI.
If I understood it correctly you are running into an infinite loop of axios requests?
Notice the [] as a second argument of useEffect? This is going to solve the infinite loop problem for you.
You can read about dependencies and the empty array part here in the doc:
https://reactjs.org/docs/hooks-effect.html
PS: you can also use async/await to handle the request. Whichever is better is just an opinion. It's up to you to decide.