graphql-jwt-tutorial icon indicating copy to clipboard operation
graphql-jwt-tutorial copied to clipboard

Is there a reason you chose to store the token on an in-memory variable as opposed to creating an AuthContext that maintained the token using useState?

Open connor-odoherty opened this issue 4 years ago • 0 comments

My knee-jerk reaction is to wrap everything in an AuthenticatedContext that updates the token using useState and exposes all the helper methods that way. Are there any downsides or limitations to that approach?

connor-odoherty avatar Nov 10 '21 22:11 connor-odoherty