Home > Net >  Where will I do request in react
Where will I do request in react

Time:04-02

My app image

Where can I make a axios request and save the data in redux? In which component should I do this? My API is https://www.weatherapi.com/api-explorer.aspx, I only need to make 1 request for the whole program.

CodePudding user response:

In your main component in the onMounted/created hook

  • Related