Using HALO in React
This section describes how to obtain HALO identity in react.
Obtaining identity
The user’s identity can be obtained by a react application with the useIdentity hook:
import React from 'react';
import { useIdentity } from '@dxos/react-client/halo';
export const MyComponent = () => { const _identity = useIdentity(); return <>{/* ... */}</>;};The object returned is of type Identity.
Once identity is established, a space must be created or joined in order to manipulate data.