Comments (27)
meanwhile to quiet the warning one can use the following fixup:
const ReactNative = require('react-native');
Object.defineProperty(ReactNative, 'AsyncStorage', {
get(): any {
return require('@react-native-community/async-storage').default;
},
});
from react-native.
Absolutely. I'd love to give this another try. Testing takes a bit of time since we need to validate the entire matrix (expo, ejected, app using AsyncStorage, app using community AsyncStorage)
from react-native.
Olé!! I just released https://github.com/storybookjs/storybook/releases/tag/v5.3.0-alpha.39 containing PR storybookjs/storybook#7801 that references this issue. Upgrade today to try it out!
You can find this prerelease on the @next
NPM tag.
Closing this issue. Please re-open if you think there's still more to do.
from react-native.
@benoitdion: any plans on reversing the reversed commit (haha) anytime soon? I see that the issue you linked is closed and seems to have been solved.
from react-native.
not the answer you're looking for but you could use YellowBox.ignoreWarnings
for now.
We could try this again now though, they've made a lot of improvements to the community asyncstorage now it should be ready
from react-native.
This did seem to resolve, looking forward to next release coming out!
from react-native.
⬆️ There's a PR for it - hopefully I've done everything correctly! Let me know if there's anything I've missed.
from react-native.
It would be. Added a comment to your PR recommending we bump our peer dependency to 57.
@shilman storybook 5.x is a good opportunity to bump our react native peer dependency version. Both expo and react-native-web have support for >= 57 so that's pretty safe.
from react-native.
The fix was reversed - storybookjs/storybook@0d7581a
It looks like we are stuck with the warning for a while react-native-async-storage/async-storage#14
from react-native.
Hey @benoitdion: any word on if this has made it into any recent alphas? Couldn't find any other issue tracking this and this one is still closed. I can submit a PR to reverse the reversed commit if that's helpful at all.
Normally warnings are manageable but this one covers the entire toolbar at the bottom even when it
s minimized. 😢
from react-native.
@shaundon Great catch. Would be great to get this into the 5.1 release which will re-introduce React Native (we didn't release a 5.0 version due to timing issues).
cc @benoitdion
from react-native.
@shilman no worries - how would you feel about also putting it in a 4.1.x
patch release too? The reason being we're still using Storybook 4.1 and upgrading to 5 is going to be a larger task that we're not in a position to undertake yet, so it'd be good to get this fixed in both versions.
from react-native.
Even though this is a trivial change I'd like to defer this to the 5.x release since this does bring in an additional dependency. react-native-async-storage
's peer dependency version of react-native is 57 and storybook's 4.x is 51.
from react-native.
On the next
branch, the RN version is 52 - so won't the peer dependency concern continue to be an issue in the 5.x release?
from react-native.
fixed in storybookjs/storybook#6079. Thanks @shaundon!
from react-native.
Huzzah!! I just released https://github.com/storybooks/storybook/releases/tag/v5.1.0-alpha.7 containing PR storybookjs/storybook#6079 that references this issue. Upgrade today to try it out!
Because it's a pre-release you can find it on the @next
NPM tag.
from react-native.
Amazing, thanks! The repo I work on is still on 4.1.x but I'll have a go with a branch using 5.1.0-alpha soon.
from react-native.
Oh nice I didn't know that RN API existed. Obviously not preferable but we can use that for the time being. We use a react-native-config
variable anyway to control rendering of storybook vs. the app in the entry point so we can do it only for storybook which is acceptable.
Cheers!
from react-native.
Any news about this issue ? I have @storybook/react-native in 5.1.9 and still got that warning :/
from react-native.
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!
from react-native.
This is still the sole issue that's holding us back from upgrading to React Native ^0.60 now that it has been released.
@benoitdion any plans on trying to merge this again soon?
from react-native.
@shilman Was this labeled as has workaround
since we can quiet the warning?
From my understanding, there is no current workaround to actually upgrade to React Native 0.60 without having this issue resolved and that is the bigger problem here than just seeing a warning.
If this issue is only concerned about hiding the warning, should I open a separate issue detailing how this is preventing folks from upgrading to React Native ^0.60?
from react-native.
@germanp173 Yeah I was referring to the comment above for how to quiet the warning. Re: the upgrade, any interest in putting together a PR for this? I think that would be the easiest way to help push things forward here.
from react-native.
@shilman roger that ... I'll see if I can put one together this weekend, thanks 👍
from react-native.
@germanp173 did you work on it by any chance ? :) If yes, could you reference your PR here? I think some people like me are subscribe to this issue
from react-native.
Hey, Since nobody worked on this I've created a PR for this issue. I am using approach that should support both expo/React Native <=0.59 and React Native >= .60 users. Tell me what you think about it.
from react-native.
react-native-async-storage/async-storage#118 (comment)
from react-native.
Related Issues (20)
- Unable to resolve "@storybook/react/dist/config" from "node_modules/@storybook/react-native/dist/preview.js" HOT 4
- Unit tests for Storybooks failing in React Native 0.73.1 HOT 3
- Headless render tests: @storybook/test-runner support or Storyshots alternative? HOT 7
- Unable to resolve module react/jsx-runtime in low version of React
- ColumnWrapperStyle not supported for single column lists HOT 8
- Android Bundling failed 3112ms Unable to resolve "@storybook/react-native" from ".storybook/index.tsx" HOT 12
- Add 'check' option in @storybook/addon-ondevice-controls HOT 5
- Documentation improvement request
- HMR issues HOT 4
- [Bug]: Passing props to TextInput causes error HOT 4
- Sidebar doesn't display stories with react-native-tvos HOT 11
- @storybook/react-native webpack bundler support HOT 2
- Generates TypeScipt while project is JS HOT 4
- using props.children results in an `Out of Memory Error` HOT 18
- examples/expo-example: does not install out of the box HOT 2
- Unable to run expo-example: Unable to resolve "./dist/index" from "../../packages/ondevice-controls/register.js" HOT 2
- Warning: Support for defaultProps will be removed HOT 1
- Passing a Component as Prop HOT 2
- RangeError: Maximum call stack size exceeded - Error after upgrading from Storybook 7-8 HOT 2
- TypeError: require.context is not a function HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native.