Skip to content
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

_global.__STORYBOOK_STORY_STORE__.getSelection undefined #18

Closed
matteodanelli opened this issue Jan 28, 2020 · 1 comment
Closed

_global.__STORYBOOK_STORY_STORE__.getSelection undefined #18

matteodanelli opened this issue Jan 28, 2020 · 1 comment

Comments

@matteodanelli
Copy link

Describe the bug
I've implemented @storybook/addon-links but when I try to create link Storybook crashes with the error written as the title.
I am using Storybook 5.3.9 for ReactNative.

To Reproduce
Configure storybook as follows:

import { getStorybookUI, configure } from '@storybook/react-native';
import '@storybook/addon-links/register';
configure(() => {
  require('./Stories');
}, module);
const StorybookUIRoot = getStorybookUI({ tabOpen: 0 });
export default StorybookUIRoot;
import { storiesOf } from '@storybook/react-native';
import { linkTo } from '@storybook/addon-links';
import { Button } from 'Button';

const stories = storiesOf('STORY', module);

stories.add('first', () => {
  return <Button onPress={linkTo('STORY', 'second')} />;
});
stories.add('second', () => {
  return <Button onPress={linkTo('STORY', 'first')} />;
});

I can see both first and second component in the side menu, but when I press the button then Storybook crashes with global._ STORYBOOK_STORY_STORE __.getSelection undefined

Expected behavior
Link to another story should work

System:

  Binaries:
    Node: 8.16.0 - ~/.nvm/versions/node/v8.16.0/bin/node
    Yarn: 1.13.0 - /usr/local/bin/yarn
    npm: 6.4.1 - ~/.nvm/versions/node/v8.16.0/bin/npm
@shilman shilman transferred this issue from storybookjs/storybook Feb 2, 2020
@Gongreg
Copy link
Member

Gongreg commented Feb 5, 2020

closing in favour of #5

@Gongreg Gongreg closed this as completed Feb 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants