Skip to content

Commit

Permalink
chore: print example result to console
Browse files Browse the repository at this point in the history
  • Loading branch information
vonovak committed Oct 2, 2021
1 parent f8dd453 commit 60b39b4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions example/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,17 @@ import DocumentPicker, {
isInProgress,
types,
} from 'react-native-document-picker'
import { useEffect } from 'react'

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

useEffect(() => {
console.log(JSON.stringify(result, null, 2))
}, [result])

const handleError = (err: Error) => {
if (DocumentPicker.isCancel(err)) {
console.warn('cancelled')
Expand Down

0 comments on commit 60b39b4

Please sign in to comment.