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
Since these exports are "the basic idea" of React Router, and Vite includes Fast Refresh out of the box, it creates the conditions for immediate developer confusion.
Since it looks like that work has already been added to Remix, would it be easy enough to create a React Router Vite plugin or something similar?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
It looks like Remix now has a Vite plugin with an
addRefreshWrapper
to improve HMR support for client routes.https://github.com/remix-run/remix/blob/main/packages/remix-dev/vite/plugin.ts#L1754C10-L1754C27
Since React Router is all client routes, is something like this being planned?
As it is not, if I export a Component and a loader, changing the file reloads the whole page, and my linter complains about the loader:
I can work around it with tricks like this:
Since these exports are "the basic idea" of React Router, and Vite includes Fast Refresh out of the box, it creates the conditions for immediate developer confusion.
Since it looks like that work has already been added to Remix, would it be easy enough to create a React Router Vite plugin or something similar?
Beta Was this translation helpful? Give feedback.
All reactions