React: Send post request to server using the data with the state updated in useEffect

前端 未结 0 1688
梦谈多话
梦谈多话 2020-12-12 12:12

recently I encountered a problem, the code is as below:

const [data, setData] = useState("");

useEffect(()=>{
  axios.get("http://localhost         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题