-
-
Notifications
You must be signed in to change notification settings - Fork 9.5k
React: Add react fast refresh #12470
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
Conversation
fix typo
Update README.md
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.
@tooppaaa is this backwards compatible?
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.
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.
Does the documentation need updating?
It was added here |
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.
Great work guys 👏 👏 👏
@@ -0,0 +1,10 @@ | |||
import { StorybookOptions as BaseOptions } from '@storybook/core/types'; |
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.
should this be import type
? does it matter?
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 think it doesn't matter much in this case. It's just a new syntax for the same thing. It's nice when there are mixed imports (types and non-types) because it makes the code more understandable, but in that case I personally feel it doesn't make a difference
@@ -1,4 +1,4 @@ | |||
import type { StorybookConfig } from '@storybook/core/types'; | |||
import type { StorybookConfig } from '@storybook/react/types'; |
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.
@hipstersmoothie is getting rid of all these separate entry points in #12462 ... i don't fully understand the rationale, but i'm wondering whether we should follow that pattern here
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'm not sure, but wouldn't it be better if we would merge this and take care of the detail either in his PR or after that's been merged?
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.
CRA does not yet support import type which forces me to extract config typings in a dedicated place.
Using existing typings causes "import type" being use by storybook and react-docgen-typescript with the crashes we saw on CI (reproduced locally)
👏 👏 👏 👏 |
Issue: #10602
What I did
Add
@pmmmwh/react-refresh-webpack-plugin
andreact-refresh
as part of the react preset, enabling out of the box support for fast refresh.