-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
React Fast Refresh #2184
Comments
Or, at least, react-hot-loader - #1120 |
@theKashey Do I get this right, that a hook to check equality for |
That was all needed before Speaking of required code changes - while RHL injects code via webpack-loader(the patch) and potentially could do the same with Preact, with FastRefresh you are expected to:
|
I would really like to help !!! If this is still not taken. |
I see two potential tasks here:
Fast refresh might be quite hard if there's a binding to the dev-tools but this can be resolved by us making a custom babel-plugin and runtime for it. I have not yet looked into this but it might be hard if our current system does not support it. I think the easiest win would be to ensure RHL support, we had that in the past (will test if it's still working) Looking at the code it might be possible to integrate this to be fair, we would just need to find a way to avoid the React symbols and support our way of rendering. When reading through the babel-plugin code I get a bit scared about Our hooks are covered here: https://github.com/facebook/react/blob/master/packages/react-refresh/src/ReactFreshBabelPlugin.js#L213 React useState initialState seems to be enriched (?) with an additional Problem being that if we would bet on implementing This is a little high-level writeup |
@Rafi993 Feel free, I doubt that this task is for a single person alone. It likely requires coordination between multiple devs. Easiest way is to share all findings approaches in this thread here 👍 |
Awesome thanks @marvinhagemeister |
@JoviDeCroock - please ignore everything around babel plugin - it just provides data to the underlying comparison function as well as function bodies ( Preparation:
Preact:
That's all. Only amended comparison and the communication channel between babel plugin and preact are needed.
|
Hello guys, I'm able to use the latest version of preact but get the error |
|
Work for a hot-reloader for Preact is being done here it's experimental for now. |
Closing this issue since I feel like Integrations are available for |
Since
react-hot-loader
is being replaced withreact-refresh
(https://github.com/gaearon/react-hot-loader#deprecation-note), are there any plan to integrate Preact with React Fast Refresh? (facebook/react#16604 (comment))The text was updated successfully, but these errors were encountered: