Git Product home page Git Product logo

Comments (11)

matteodanelli avatar matteodanelli commented on July 17, 2024 5

This issue is still around, as mentioned in the referenced one.

from react-native.

JanithaR avatar JanithaR commented on July 17, 2024 4

Yo, still happens in 2021!

"@storybook/addon-links": "^5.3"

<Button status="danger" onPress={linkTo('RMS/Screens/Scan', 'scan serial number')}>
    Link test
</Button>

TypeError: undefined is not an object (evaluating '_global.STORYBOOK_STORY_STORE.getSelection')

from react-native.

RWOverdijk avatar RWOverdijk commented on July 17, 2024 1

Calm down github actions, I got this. Much love <3

from react-native.

stale avatar stale commented on July 17, 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.

shilman avatar shilman commented on July 17, 2024

@RWOverdijk do you? :trollface:

from react-native.

Gongreg avatar Gongreg commented on July 17, 2024

The addon is still broken.

@ndelangen, you've updated link addon to use global story store. React Native does not expose one.

Also React Native is not listening to SELECT_STORY event to update selected story, it actually emits this event itself so the web tree view would update when user select story through simulator.

from react-native.

FrenchSam avatar FrenchSam commented on July 17, 2024

Hi! I just ran into this issue, is there any workaround available (or an ETA for a fix)? Thanks!

from react-native.

gobengo avatar gobengo commented on July 17, 2024

Also React Native is not listening to SELECT_STORY event to update selected story

FWIW, I confirmed that React Native will react to a SET_CURRENT_STORY event. This event requires a storyId, though, but that can be generated like follows:

import {SET_CURRENT_STORY} from '@storybook/core-events';
import { toId } from '@storybook/csf';
import {addons} from '@storybook/addons';

const story = {
  kindName: 'YourComponent',
  name: 'Basic',
};

addons.getChannel().emit(SET_CURRENT_STORY, {
  storyId: toId(story.kindName, story.name),
})

I'm not using the addon-links, but doing somehting similar on my own. But it sounds like either:

  • addon-links should emit SET_CURRENT_STORY instead of SELECT_STORY (what's the difference?)
  • alternatively maybe @storybook/react-native should be listening for SELECT_STORY

from react-native.

brandon-austin-lark avatar brandon-austin-lark commented on July 17, 2024

And 2022, still an issue

from react-native.

dannyhw avatar dannyhw commented on July 17, 2024

I've never really used this addon so I'm not familiar with it. I will look into fixing it however it's not top priority on the list. If anyone wants to create a PR I'll happily assist etc.

Thanks 🙏

--

Edit: also make sure you are using version ~5 of the addon and not anything newer (6) or it's probably got no chance of working. Alternatively it might actually work in the 6.0 beta since it uses the updated event names though I don't know for sure.

from react-native.

tobi1220 avatar tobi1220 commented on July 17, 2024

has this been fixed?

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.