Skip to content

Commit 5d34288

Browse files
authored
Merge pull request #21 from contentpass/docs-update-readme
docs: update readme
2 parents ba72a6b + 68a1a08 commit 5d34288

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,16 @@ or improved. The SDK will then refresh and revalidate the user's authentication
8989
```jsx
9090
import React, { useEffect } from 'react';
9191
import { useContentpassSdk } from 'react-native-contentpass';
92+
import { Button, View } from 'react-native';
9293

9394
const YourApp = () => {
94-
const { authenticate, registerObserver, unregisterObserver, logout, recoverFromError } = useContentpassSdk();
95+
const {
96+
authenticate,
97+
registerObserver,
98+
unregisterObserver,
99+
logout,
100+
recoverFromError
101+
} = useContentpassSdk();
95102

96103
useEffect(() => {
97104
const observer = (state) => {
@@ -106,7 +113,9 @@ const YourApp = () => {
106113
}, []);
107114

108115
return (
109-
<button onClick={authenticate}>Authenticate</button>
116+
<View>
117+
<Button onPress={authenticate} title={'Authenticate'} />
118+
</View>
110119
);
111120
};
112121
```

0 commit comments

Comments
 (0)