-
Notifications
You must be signed in to change notification settings - Fork 84
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
snowpack and react-refresh question #260
Comments
Hi Florian, this is the same issue that blocks Feliz from fully using How to solve this issue? Generating React output that fast-refresh knows how to work with which is basically a simplified version of what Fable does right now. Is this possible now? No, we cannot change how Fable works with bindings. HOWEVER, in Fable 3 @alfonsogarciacaro is working on bringing plugins back which should allow me to build an internal Fable plugin that rewrites the generated into something that works with the fast-refresh properly. I am waiting for an alpha release with plugin support to start juggling the ASTs |
That's interesting. Looking at the source code for @Zaid-Ajaj and I have done a lot of tinkering to get it to work, and it's not really achievable while being user friendly currently. You can see the discussions in these two issues #157 and #203. With Fable 3 (hopefully) coming soon and the implementation of a plugin system we will likely compile the Feliz code into actual jsx and should work out of the box without the user really even thinking about it. |
This indeed looks like a very good use-case for plugins! There's already an alpha version of Nagareyama (Fable 3) released and I'm just testing it with some production projects in order to polish issues and make an informal announcement with upgrade instructions. Plugins come next, most of the preparation work (cleaning up the AST and making it independent of FCS) is already done and there's already a POC for Fable 2 so hopefully it shouldn't take much time. As soon as it's ready I will contact you so we can test it with fast-refresh 👍 |
Hey all, thanks for the thorough explanation! |
Hey @Zaid-Ajaj
I'm playing around with snowpack and have a
fast refresh
related question.In short:
react-refresh
fable-splitter
, compile F# to js and snowpick just picks it up like any other JS file.Sun
component)Moon
component)Any thoughts? What is Feliz doing that is so different from what
Fable.React
is doing.The text was updated successfully, but these errors were encountered: