obabichev / react-token-auth

84 stars 22 forks source link

Getting logged status without a hook #16

Closed kevinhikaruevans closed 2 years ago

kevinhikaruevans commented 3 years ago

Is it possible to get whether the user is logged in without using a hook? I'm wondering because I'd like to check in a React.Component and cannot use a hook there.

obabichev commented 2 years ago

Sorry for the long answer, but now it's already possible,

there are two provided methods: