In order for React Fast Refresh to work, files must include only one JS export. This means you should only expose one functional component (decorated with Feliz.ReactComponent or JSX.Component) and the rest of the code in the file must be private.
@alfonsogarciacaro
I think the "files must include only one JS export" is incorrect.
At least when using Feliz + Feliz.UseElmish, you can have several exports.
From my tests and understanding, the limitation for React Fast Refresh is that only ReactComponents should be exposed from the module.
So you can do stuff like:
type Components with
[<ReactComponent>]
static member AnErrorOccured = // ...
[<ReactComponent>]
static member AnErrorOccured(title: string, subtitle: string) = // ...
@alfonsogarciacaro
I think the "files must include only one JS export" is incorrect.
At least when using Feliz + Feliz.UseElmish, you can have several exports.
From my tests and understanding, the limitation for React Fast Refresh is that only ReactComponents should be exposed from the module.
So you can do stuff like:
Example taken from Fable.Packages.