graphql-jwt-tutorial
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?
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?