State is not updated in an useEffect

前端 未结 0 814
死守一世寂寞
死守一世寂寞 2021-02-18 21:25

Through an API service, I\'m trying to get data and update the state, but it gives me null.

The service:

const [exampleService] = useState(new ExampleServi         


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