storybook-addon-options
storybook-addon-options copied to clipboard
Usage with React Native
I'm failing to get this to work with React Native (and create-react-native-app). After following the README, I get the error null is not an object (evaluating 'channel.emit')
@ setOptions
.
storybook/addons.js
import '@kadira/react-native-storybook/addons';
import '@kadira/storybook-addon-options/register';
storybook/index.js
import './addons';
import { NativeModules } from 'react-native';
import { getStorybookUI, configure } from '@kadira/react-native-storybook';
import url from 'url';
import { setOptions } from '@kadira/storybook-addon-options';
setOptions({
name: 'CUSTOM-OPTIONS',
url: 'https://github.com/kadirahq/storybook-addon-options',
goFullScreen: false,
showLeftPanel: false,
showDownPanel: false,
showSearchBox: false,
downPanelInRight: false,
sortStoriesByKind: false,
});
configure(
() => {
require('./stories');
},
module
);
const { hostname } = url.parse(NativeModules.SourceCode.scriptURL);
export default getStorybookUI({ port: 19001, host: hostname });
Any idea, what the problem might be?