Basic import of withInfo Add On in ReactNative gives error Module './lib/nestedObjectAssign.js' was required dynamically. This is not supported by Metro bundler
Happens just by adding import { withInfo } from '@storybook/addon-info'
import Button from './Button' couldn't get past this to even add a story using the add on.
Same problem here.
"@storybook/addon-actions": "^4.0.0-alpha.14",
"@storybook/addon-info": "^4.0.0-alpha.14",
"@storybook/addon-links": "^4.0.0-alpha.14",
"@storybook/addons": "^4.0.0-alpha.14",
"@storybook/react-native": "^4.0.0-alpha.14",
Addon info is not supported in react native
Is it possible to get some information about why it isn't supported? I don't see this documented anywhere...
Sure.
Addon support is documented here: https://github.com/storybooks/storybook/blob/master/ADDONS_SUPPORT.md
Regarding why it is not supported is that info addon a strange addon since it doesn't work inside addon (panel) area. It works by rendering info in preview area. React Native doesn't use preview area at all.
There are alternatives to get withInfo functionality for RN:
notes addon: https://github.com/storybooks/storybook/tree/master/addons/notes (I am not sure why it says it is not supported, it should be).
jsx addon:
https://github.com/storybooks/addon-jsx
docgen addon:
https://www.npmjs.com/package/storybook-addon-docgen
You will also need to update your babelrc to support docgen addon.
I know it is not the same, but currently it is the only way to achieve it.
Thanks for detailed response. I like this one informative
Addon Support for each platform
Most helpful comment
Sure.
Addon support is documented here: https://github.com/storybooks/storybook/blob/master/ADDONS_SUPPORT.md
Regarding why it is not supported is that info addon a strange addon since it doesn't work inside addon (panel) area. It works by rendering info in preview area. React Native doesn't use preview area at all.
There are alternatives to get withInfo functionality for RN:
notes addon: https://github.com/storybooks/storybook/tree/master/addons/notes (I am not sure why it says it is not supported, it should be).
jsx addon:
https://github.com/storybooks/addon-jsx
docgen addon:
https://www.npmjs.com/package/storybook-addon-docgen
You will also need to update your babelrc to support docgen addon.
I know it is not the same, but currently it is the only way to achieve it.