Sign Out¶
React Auth Kit has easy-to-implement Sign Out procedures.
signOut functionality available in both React Hook
and Higher Order Component
- For Functional Components, you can use
useSignOut()
hook inside any components - For class-based components, you can wrap the component inside
withSignOut()
HOC function.
Hook¶
Call useSignOut()
hook inside any component to signout the user.
Import¶
Import useSignOut in your app | |
---|---|
Usage¶
SignOut.js | |
---|---|
Higher Order Component¶
Wrap class-based component with withSignOut()
to implement signout.
Import¶
Import withSignOut in your app | |
---|---|
Demo¶
SignOut.js | |
---|---|
API¶
— 🔑 —
React Auth Kit is MIT License code