-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use community AsyncStorage instead of deprecated React Native one #6079
Conversation
@shaundon Is the community package backwards-compatible? If so, I should be able to patch it back into 4.x. Will defer to @benoitdion who's leading Storybook RN dev |
As far as I'm aware, the community package is backwards compatible and is a drop-in replacement for the RN package (same API methods etc). Thanks for your help so far 😄 |
LGTM. Do you know why 3090 lines got removed from yarn.lock when adding a dependency? Let's continue the release timeline discussion in #6078. |
To be honest I have no idea 🙈 Let me just try reverting the file and running |
@@ -27,6 +27,7 @@ | |||
"prepare": "node ../../scripts/prepare.js" | |||
}, | |||
"dependencies": { | |||
"@react-native-community/async-storage": "^1.2.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's bring the dev/peer react-native dependency to 57 as part of this. 57 is 6 months old at this point, should be ok to make it a requirement for storybook 5.x
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just updated the version. Hopefully CI is ok with it, when the codebase I primarily work on went from 55 to 57, upgrading was really difficult.
Codecov Report
@@ Coverage Diff @@
## next #6079 +/- ##
=========================================
- Coverage 37.11% 37.1% -0.01%
=========================================
Files 648 648
Lines 9523 9524 +1
Branches 1352 1352
=========================================
Hits 3534 3534
- Misses 5410 5411 +1
Partials 579 579
Continue to review full report at Codecov.
|
I regenerated the lockfile and the changes are much more rational now. Thanks for pointing it out. |
Hey @shaundon, heads up that we're running into react-native-async-storage/async-storage#14. If we're unable to find a viable workaround we may end up reverting this. |
Oh damn - typical that the fix introduces a different bug 🤦♂️I totally understand though 👍 |
Issue: #6078
What I did
Added a dependency on @react-native-community/async-storage to replace the deprecated one from RN, which was causing warnings to appear when using RN 0.59 (see https://github.com/storybooks/storybook/issues/6078).
How to test
Run the kitchen sink app and there's no longer a warning displayed.
It would be brilliant if this could make it into both the 5.x release and also a 4.1.x patch release, as it'll be affecting people using RN 0.59 who aren't able to migrate to Storybook 5 yet.