Skip to content

Commit 0efdfa1

Browse files
docs: add named import migration instructions (#851)
1 parent 6a31f39 commit 0efdfa1

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

docs/docs/sponsor-only/migration.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,18 @@ becomes
2222
import { ... } from '@react-native-documents/picker'
2323
```
2424

25+
Also, if you previously used a default import like this:
26+
27+
```ts
28+
import DocumentPicker from 'react-native-document-picker'
29+
```
30+
31+
you should update it to use named imports for the methods you need (such as `pick`, `keepLocalCopy`, etc):
32+
33+
```ts
34+
import { pick, keepLocalCopy } from '@react-native-documents/picker'
35+
```
36+
2537
2. remove `pickSingle`
2638

2739
Replace `pickSingle` with `pick`:

0 commit comments

Comments
 (0)