So I'm working on a project using the library! And the only thing I'm missing is how to get the user's name, email etc. stored into redux for usage across the app. My approach was to decode the JWT token and store it inside the onHydration hook. My code looks like this:
So I'm working on a project using the library! And the only thing I'm missing is how to get the user's name, email etc. stored into redux for usage across the app. My approach was to decode the JWT token and store it inside the onHydration hook. My code looks like this:
But I am not able to dispatch outside of a react component. What would be the correct approach?
Thanks!