You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Vite's hot reload/fast refresh/HMR/whatever term it uses doesn't work with the callable setup. I get the warning: Could not Fast Refresh. Learn more at https://github.com/vitejs/vite-plugin-react-swc#consistent-components-exports. This causes the callable to vanish every time the module is invalidated (any time the file is saved), which causes me to have to re-perform actions to open it to see my changes - which is not the best developer experience.
The best workaround I've found so far is to separate out the component and the callable into two separate files. The downside to that is that it ends up with an extra file that is basically a one-liner.
I don't know if this is something that is fixable, but if it's not, there should be a note about HMR (hot module reload) in the readme.
Example of the two file approach mentioned. Note that Confirm.tsx still can't be HMRed, but you can edit the ConfirmBase.tsx which will work without issue.
Vite's hot reload/fast refresh/HMR/whatever term it uses doesn't work with the callable setup. I get the warning:
Could not Fast Refresh. Learn more at https://github.com/vitejs/vite-plugin-react-swc#consistent-components-exports
. This causes the callable to vanish every time the module is invalidated (any time the file is saved), which causes me to have to re-perform actions to open it to see my changes - which is not the best developer experience.The best workaround I've found so far is to separate out the component and the callable into two separate files. The downside to that is that it ends up with an extra file that is basically a one-liner.
I don't know if this is something that is fixable, but if it's not, there should be a note about HMR (hot module reload) in the readme.
Example of the two file approach mentioned. Note that
Confirm.tsx
still can't be HMRed, but you can edit theConfirmBase.tsx
which will work without issue.The text was updated successfully, but these errors were encountered: