-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Removing the packager from storybook. #4261
Conversation
I think it's rather an important breaking change, so having a note in the MIGRATION.md will be a good thing |
@igor-dv Definitely. |
Codecov Report
@@ Coverage Diff @@
## master #4261 +/- ##
==========================================
+ Coverage 40.61% 40.77% +0.15%
==========================================
Files 495 495
Lines 5875 5852 -23
Branches 784 777 -7
==========================================
Hits 2386 2386
+ Misses 3111 3095 -16
+ Partials 378 371 -7
Continue to review full report at Codecov.
|
try { | ||
// eslint-disable-next-line global-require | ||
require('babel-register')({ | ||
presets: [require.resolve('babel-preset-flow')], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do babel-register
and babel-preset-flow
still need to be installed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question. What were they used for in the first place?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no idea =)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah but it is flow and some other things. I will remove it.
Thanks @igor-dv .
@Gongreg, is anything missing here ? |
Nothing that I am aware of. We will do a blog post regarding this update. But it is not part of the PR |
@igor-dv one thing that is missing from this is some instructions on how to switch from the storybook UI to the react native UI. The old behavior kept this separate but I don't see how this makes sense |
@jqn You could have a storybook tab in bottom nav menu. Or inside admin panel. Or even the same switch you just wrote about. It shouldnt be more work to switch this way than killing packager and starting the new one. Or if you want to you can still start the packager old way, you just have to do it yourself. We will release a blogpost/update storybook website with information when 4.0 is released. Or you can check docs folder in @storybook/react-native code. (I am on mobile so it is hard to link it) |
More or less to sum it up storybook should be part of your ui instead switching back and forth. |
Or you can start the RN packager using the storybook dir: |
Actually I just tried to give this a go and with RN >= 0.56 this throws an error |
It may be |
It is
|
@kdawgwilk @Gongreg keep in mind that |
Issue: #4179
By having packager logic inside storybook we are prone for breaking things.
We have to support metro, haul, typescript and other cases. All of these things are responsibility of the user.
To avoid it I've completely removed packager logic from storybook.
What is more starting from v5.0 the default behaviour will be to skip the server altogether and include StorybookUI in your app so this is a first step to that direction.
I've added some info how to bring back old behaviour @petrbela suggested it.