Skip to content

Commit 60b39b4

Browse files
committed
chore: print example result to console
1 parent f8dd453 commit 60b39b4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

example/src/App.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,17 @@ import DocumentPicker, {
77
isInProgress,
88
types,
99
} from 'react-native-document-picker'
10+
import { useEffect } from 'react'
1011

1112
export default function App() {
1213
const [result, setResult] = React.useState<
1314
Array<DocumentPickerResponse> | DirectoryPickerResponse | undefined | null
1415
>()
1516

17+
useEffect(() => {
18+
console.log(JSON.stringify(result, null, 2))
19+
}, [result])
20+
1621
const handleError = (err: Error) => {
1722
if (DocumentPicker.isCancel(err)) {
1823
console.warn('cancelled')

0 commit comments

Comments
 (0)