Using React for this first time.
I'm trying to fetch from an api, but it keeps showing up as undefined.
I curl it on my command line and the data is received.
async componentDidMount() {
const url = "https://covidtracking.com/api/v1/states/current.json";
const { data } = await fetch(url);
const modifiedData = data.map( (stateData) => ({
state: stateData.state,
pos: stateData.positive,
}))
this.setState({ data: modifiedData, loading: false });
}