Has anyone solved this?, i’m stuck at the same point and i’ve checked my routes and my spelling etc etc. I compared against the code in the repo and it looks to be correct.
Can’t see where i’ve gone wrong but still getting “this.props.userHasAuthenticated is not a function” error
Any ideas on why my session is saved between refreshing the page? I double checked the code and am not getting any errors in the dev console so not sure what I missed.
i read about an error that i get several times in this comments.
it appears in the login.js when i call this.props.userHasAutheticated(true);
If i do that, the browsers console shows: TypeError: Cannot read property ‘props’ of undefined
If i make console.log(this.props.userHasAutheticated) in the constructor, it shows the source code of the function from app.js.
So i dont know what to do. I hope somebody can help me with that
i fixed it, the problem was, that i am using axios instead of aws.
and axios is using a .then function in wich you cannot use this.
So i made this in front of the axios call: var self = this;
then i was able to call the prop, with self.props.userhasauthenticated
So after searching high and low, I think this has to do with the version of REACT and or eslint I had on my windows machine. I’m going to uninstall everything and go through the process again from the start to see if I can use a lower version of REACT and eslint.
Hopefully downgrading to REACT Scripts to 3.0.1 will work… still not sure how to do that but what are your thoughts? Maybe even reverting eslint to 6.4.0 could help.
I’m seeing an issue where the login screen is briefly displayed before the authenticated route is shown. I think it’s happening on cold starts and page refreshes. Is anyone else seeing this?