I have a "Home" view extends Dataview, and a "Login" view extends form.Panel. In home view, there is a store with url = "http://localhost/getInfo.php?userID=" + localStorage.getItem('userID')
When user login, I save the UserID to localstorage, remove the login view, and add this home view.
The problem I have right now is, there won't be any value returned from localStorage.getItem('userID') for the first time login, and will return the userID of the first user when the second user log in later.
I guess this problem is caused by the order of creating classes.
In my code, the order is: setItem('userID', id) -> Ext.create('Main') -> Ext.destory('Login')
Could anyone provide a suggestion of what may caused this problem and maybe how to solve it?
Thanks in advance!
Best best regards