ЮЧ
Size: a a a
ЮЧ
ЮЧ
p
componentDidMount добавить еще один запрос , то он может быстрее отправить, нежели в стейте появятся id-шникиЮЧ
ЮЧ
async/await синтаксисом.ЮЧ
async componentDiMount() {
const matches = await getMatches()
const matchesObj = await getMatchesObj(matches)
this.setState({ matchesObj })
}ЮЧ
p
async componentDiMount() {
const matches = await getMatches()
const matchesObj = await getMatchesObj(matches)
this.setState({ matchesObj })
}p
ЮЧ
const getMatches = async () => {
const response = await axios.get("...")
const matches = response.data.map(...).filter(...)
return matches
}ЮЧ
return перед axios.get.ЮЧ
p
const getMatches = async () => {
const response = await axios.get("...")
const matches = response.data.map(...).filter(...)
return matches
}p
p

ЮЧ
p