0.1.9 • Published 5 years ago
thau-react v0.1.9
thau-react
React wrapper around Thau API
Installation
npm install thau-js thau-reactor
yarn add thau-js thau-reactUsage
Wrap your application with ThauProvider:
import { ThauProvider } from 'react-thau'
export default function App() {
<ThauProvider thauUrl="http://localhost:9000/api/v1">
...
</ThauProvider>
}And now down in the tree you can use any of the available exported hooks (see documentation for more details about each of the hooks):
useThau()useCreateUserWithPassword()useSession()useOpenSessions()useUserProviders()useLoginWithFacebook()useLoginWithGoogle()useLoginWithGithub()useLoginWithTwitter()useLoginWithLinkedIn()useLoginWithPassword()useLogout()