Can the setState method be called again in the callback function of the setState method in react?

after requesting the data in componentWillMount, after the setState operation of the obtained data, can you initiate the ajax request with the parameters in state in the setState callback and then retrieve the data setState
componentWillMount () {

let appId = this.GetQueryString("appId")
let language = this.GetQueryString("language")
axios.post("/api/language/findAll").then(res=>{
  console.log("0000")
  for(let i=0;i<res.length;iPP){
    if(res[i].en==language){
      this.setState({
        language:res[i].pid,
        appId:appId
      },()=>{
        this.queryConfig()
      })
    }
  }
})

}
queryConfig () {

let params={
  appId:this.state.appId,
  lang:this.state.language
}
axios.post("/api/spirit/config",params).then(res=>{
    console.log("")
    this.setState({
      custom:res.spirit.custom,
      recommend:res.spirit.recommend,
      strategy:res.spirit.strategy,
    },()=>{console.log("")})
})

};

Mar.23,2021

Yes, no problem at all.

calling setState in render will cause problems.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3530d-2bf81.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3530d-2bf81.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?