I am building a React Application with multi-router

**Home router call an API in use Effect but when I navigate to another Route and go back to home the request is recall and the component which contain response is reload**

is there a way to save history so when I come back the route not calling the API and if it call it, at least not reload the section using response

**here my Use-effect**

```
useEffect(() => {

(async () => {

  try{
      const response = await axios.get("user")
        dispatch(setAuth(response.data))
      }
  catch(e){}
  try{
      const response = await axios.get("get_all_posts")
      setpostsInfo(response.data)
  }
  catch(e){}
})()
}, []);

```

**Thanks for help**