Skip to content

Commit edcdeb9

Browse files
author
sw-yx
committed
gs
1 parent 6756cf1 commit edcdeb9

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.md

+14
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,20 @@ function Dashboard() {
182182

183183
</details>
184184

185+
## Lower level API: `useNetlifyIdentity`
186+
187+
If you'd like to handle your own context yourself, you can use this library as a hook as well:
188+
189+
```tsx
190+
function useNetlifyIdentity(
191+
url: string,
192+
onAuthChange: authChangeParam = () => {},
193+
enableRunRoutes: boolean = true
194+
): ReactNetlifyIdentityAPI;
195+
```
196+
197+
the library watches for and handles confirmation routes by default. If you don't like this, pass `enableRunRoutes: false`. This was added here https://github.com/sw-yx/react-netlify-identity/issues/12 in v0.1.8
198+
185199
## License
186200

187201
MIT © [sw-yx](https://github.com/sw-yx)

0 commit comments

Comments
 (0)