You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, I would like so say thank you for your project! It helped me to lot to understand the concepts and I could successfully apply it in my projects! Keep it up!
I have found out something which worries me. If I run the whole app environment (specified in the README) and if I retrieve the store somewhere, I do not see the User properly persisted in the redux store. What I have just done is to log the redux state for example at UserInfo page.
import store from '../configureStore'
import {createHashHistory} from 'history';
console.log(store(createHashHistory()).getState())
As you can see the user is null. Is it the expected behaviour?
Of course, if I generally connect a component to the redux store, and I retrieve the user data via props, it can be done successfully and I can read all the relevant data (access_token, etc).
But let's say that we are at the UserInfo page showing all the data. If the access_token is refreshed (with a silentRenew) then the page is not rerendered. Is it the expected behaviour by you? I would expect a rerender, since the underlying User has got another access_token from the silentRenew.
Thank you very much for your help, I appreciate it!
Kind Regads,
Daniel Moka
The text was updated successfully, but these errors were encountered:
Hi @mirind4, thanks for the feedback, I'm glad this project could help you :)
I don't quite understand the frst part of you question, if I follow your reproduction steps, the user is properly persisted to the store. You seem to be logging the store from App.tsx, this is called on intial load so the store will always be empty at that point. By the way, the store is already logged to the console with redux logger, so no need to add extra logs ;)
About the silent renew, you are right, the UserInfo page should be re-rendered, but it is not. I will have a look, and get back to you on that one.
First of all many thanks for you answer! As for my reproduction scenario I have done it on the UserInfo page, and after I log in with an user, I checked it the logging coming from this
Then it produces the above mentioned result, where the user is null. If I connect to the store, I can see the user persisted, on the other hand, if I retrieve it with the command "store(createHashHistory()).getState()", I receive null for user.
But right now I think I know where the problem can come from. Does it have something to do with the fact that I create a new store with hash history in the UserInfo page? What do you think?
As for the second issue, thanks again for checking it out, I look forward to you additional feedback!
Keep it up the good work!
Hey!
First of all, I would like so say thank you for your project! It helped me to lot to understand the concepts and I could successfully apply it in my projects! Keep it up!
I have found out something which worries me. If I run the whole app environment (specified in the README) and if I retrieve the store somewhere, I do not see the User properly persisted in the redux store. What I have just done is to log the redux state for example at UserInfo page.
Reproduction scenario:
As you can see the user is null. Is it the expected behaviour?
Of course, if I generally connect a component to the redux store, and I retrieve the user data via props, it can be done successfully and I can read all the relevant data (access_token, etc).
But let's say that we are at the UserInfo page showing all the data. If the access_token is refreshed (with a silentRenew) then the page is not rerendered. Is it the expected behaviour by you? I would expect a rerender, since the underlying User has got another access_token from the silentRenew.
Thank you very much for your help, I appreciate it!
Kind Regads,
Daniel Moka
The text was updated successfully, but these errors were encountered: