Hooks
The @arcblock/did-connect-react library offers a powerful set of React hooks that provide programmatic control and flexible data access. While the SessionProvider offers a convenient context-based approach, hooks give you the fine-grained control needed for complex UIs and advanced use cases.
These hooks allow you to manage the connection flow, access user data, and integrate various authentication methods from any component within the SessionProvider's scope.
Summary#
By leveraging these hooks, you can build highly customized and seamless user experiences. Start by exploring useConnect to understand how to trigger the login flow, then see how useDid can help you display user information.
Ready to dive deeper? Choose a hook from above to learn more, or proceed to the UI Components section to see how you can display user data.