Home > react-directus > useDirectus
useDirectus is a React Hook that provides an instance of the Directus SDK and the apiUrl
Signature:
useDirectus: () => DirectusContextType<any>
Here is an example of how to use useDirectus
const { directus } = useDirectus();
directus.auth.login({ email: '', password: '' });