Hi David,
Thanks for your reply. I gave getAppStore a try but encountered the same problem as when I tried to retrieve props as shown in the earlier comment.
Here is a way you can validate my workflow:
- Add a secured map to your editor sample.
- In widget.tsx add this function, and call that function in return()
checkUserStatus() {
let test = getAppStore().getState().user
console.log(test)
}
return (
{this.checkUserStatus()} )
3. On the initial load of the app a user will be prompted to log in. After the map loads click on the widget, open up Dev Tools: Console will show null.
4. Load app again. Credentials are grabbed from the cache and both methods successfully return the user details.
My wild hypothesis is that the framework is not updating props after credentials are verified. Really struggling to find a way to make this work for secured content.