React-Native-JWT-Client icon indicating copy to clipboard operation
React-Native-JWT-Client copied to clipboard

TypeError: undefined is not an object (evaluating 'this.props.newJWT')

Open stevenhardy-digital opened this issue 6 years ago • 1 comments

Hello, When logging into my react app, i get the following error: TypeError: undefined is not an object (evaluating 'this.props.newJWT')

This is stopping the app to move to the other screen. If i stop the process and the rerun the app i am logged in, the access token is being stored correctly and is retrievable too.

Do you have any ideas please?

I have put my code on a JSFiddle - https://jsfiddle.net/bfk7xg2L/

Thank you!

stevenhardy-digital avatar Feb 09 '19 14:02 stevenhardy-digital

Hi try this:

.then((response) => { deviceStorage.saveKey("id_token", response.data.token); this.props.newJWT(response.data.token); console.log(response.data.token);

})

zarzarbin avatar Nov 26 '19 01:11 zarzarbin