CLI: Fix addons register in RN template #18693
Merged
+2
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue: #18692
Fix Module not found: Can't resolve '@storybook/addon-ondevice-actions/manager' error after installing storybook on react native expo app (npx -p @storybook/cli sb init --type react_native)
Issue:
Getting module not found error when trying to run storybook in react native expo app
What I did
Changed these two imports to point to /register instead of /manager:
import '@storybook/addon-ondevice-actions/manager';
import '@storybook/addon-ondevice-knobs/manager';
How to test
Follow the steps depicted in Storybook get started:
expo init --template tabs@sdk-36 taskbox
(Create new empty expo project)cd taskbox
npx -p @storybook/cli sb init --type react_native
(Add storybook support)export {default} from './storybook';
(Export default from entrypoint of your app)After setting up the project if you try to run storybook it will not crash as before
If your answer is yes to any of these, please make sure to include it in your PR.