It was an interview question (saw it somewhere online) and have researched but could not really find answers.
How can I prevent re fetching data when component re renders? I dont mean limiting it to being fetched only once (that I could do by making the request inside the constructor function).
Also, the only thing I found was a quick mentioning of using an external (to the react app) api. I do not understand what that means and how this can prevent data from being refetched.
Thanks a lot!