In my App i need to check, if a user is allready in the local storage, befor i call my api. if the user is allready in the storage, i want to give back the old data and dont call the api again.
My problem is, that when i try to check the sotrage, my app calls the api to fast. I dondt understand why.
So i call my getUser methode, in this method i check the localstorage value and then i check the value.
Maybe there is a way to tait for the local storage data.