diff --git a/addons/storyshots/src/index.js b/addons/storyshots/src/index.js index 6bd2614cb899..245b28a9b78f 100644 --- a/addons/storyshots/src/index.js +++ b/addons/storyshots/src/index.js @@ -24,9 +24,11 @@ const hasDependency = name => export default function testStorySnapshots(options = {}) { addons.setChannel(createChannel()); - const isStorybook = options.framework === 'react' || hasDependency('@storybook/react'); + const isStorybook = + options.framework === 'react' || (!options.framework && hasDependency('@storybook/react')); const isRNStorybook = - options.framework === 'react-native' || hasDependency('@storybook/react-native'); + options.framework === 'react-native' || + (!options.framework && hasDependency('@storybook/react-native')); if (isStorybook) { storybook = require.requireActual('@storybook/react'); diff --git a/examples/react-native-vanilla/package.json b/examples/react-native-vanilla/package.json index 1d151031509e..10030fc11cf3 100644 --- a/examples/react-native-vanilla/package.json +++ b/examples/react-native-vanilla/package.json @@ -24,6 +24,7 @@ "@storybook/channels": "file:../../lib/channels", "@storybook/channel-postmessage": "file:../../lib/channel-postmessage", "@storybook/react-native": "file:../../app/react-native", + "@storybook/react": "file:../../app/react", "@storybook/ui": "file:../../lib/ui", "react-dom": "^15.5.4" }