Skip to content
Permalink
Browse files
Merge pull request #9885 from gaguirre/patch-3
Fix typo on AsyncStorage section
  • Loading branch information
shilman committed Feb 25, 2020
1 parent 853c72a commit 654aeb9fedd51d1a82bc30a6d50b42ce5843d67a
Showing with 2 additions and 2 deletions.
  1. +2 −2 MIGRATION.md
@@ -178,14 +178,14 @@ To avoid that now you have to manually pass asyncStorage to React Native Storybo

Solution:

- Use `require('@react-native-community/async-storage').AsyncStorage` for React Native v0.59 and above.
- Use `require('@react-native-community/async-storage').default` for React Native v0.59 and above.
- Use `require('react-native').AsyncStorage` for React Native v0.58 or below.
- Use `null` to disable Async Storage completely.

```javascript
getStorybookUI({
...
asyncStorage: require('@react-native-community/async-storage').AsyncStorage || require('react-native').AsyncStorage || null
asyncStorage: require('@react-native-community/async-storage').default || require('react-native').AsyncStorage || null
});
```

0 comments on commit 654aeb9

Please sign in to comment.