I need to do a request when the page loaded (only once). I tried to do something like
if(!array.length){doRequest())
But with this method, react does more than 1 request, and I think that it will reduce my app speed. So I need the solution of this problem.
Thanks