Giter VIP home page Giter VIP logo

Comments (27)

barbieri avatar barbieri commented on August 29, 2024 7

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.

benoitdion avatar benoitdion commented on August 29, 2024 4

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.

shilman avatar shilman commented on August 29, 2024 4

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.

lucasbento avatar lucasbento commented on August 29, 2024 3

@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.

benoitdion avatar benoitdion commented on August 29, 2024 2

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.

code-jenn-or avatar code-jenn-or commented on August 29, 2024 2

This did seem to resolve, looking forward to next release coming out!

from react-native.

shaundon avatar shaundon commented on August 29, 2024 1

⬆️ 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.

benoitdion avatar benoitdion commented on August 29, 2024 1

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.

yurykorzun avatar yurykorzun commented on August 29, 2024 1

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.

bericp1 avatar bericp1 commented on August 29, 2024 1

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.

shilman avatar shilman commented on August 29, 2024

@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.

shaundon avatar shaundon commented on August 29, 2024

@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.

benoitdion avatar benoitdion commented on August 29, 2024

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.

shaundon avatar shaundon commented on August 29, 2024

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.

benoitdion avatar benoitdion commented on August 29, 2024

fixed in storybookjs/storybook#6079. Thanks @shaundon!

from react-native.

shilman avatar shilman commented on August 29, 2024

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.

shaundon avatar shaundon commented on August 29, 2024

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.

bericp1 avatar bericp1 commented on August 29, 2024

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.

joan-saum avatar joan-saum commented on August 29, 2024

Any news about this issue ? I have @storybook/react-native in 5.1.9 and still got that warning :/

from react-native.

stale avatar stale commented on August 29, 2024

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.

techgerm avatar techgerm commented on August 29, 2024

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.

techgerm avatar techgerm commented on August 29, 2024

@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.

shilman avatar shilman commented on August 29, 2024

@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.

techgerm avatar techgerm commented on August 29, 2024

@shilman roger that ... I'll see if I can put one together this weekend, thanks 👍

from react-native.

joan-saum avatar joan-saum commented on August 29, 2024

@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.

Gongreg avatar Gongreg commented on August 29, 2024

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.

jgreen210 avatar jgreen210 commented on August 29, 2024

react-native-async-storage/async-storage#118 (comment)

from react-native.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.