HMR breaks when exporting nameless default function from a route #1332
Closed
ajayraveendran
started this conversation in
Feedback
Replies: 3 comments
-
|
Thanks for sharing @ajayraveendran. @frandiox might have some additional insights here. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
It's a known issue in React Refresh, which is used by Remix HMR internally: facebook/react#21181 Nothing we can do about it here but thanks for bringing it up for others to see 👍 |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
That makes sense. Thanks for linking the source here. It's also probably good practice to name functions too. Appreciate the quick response |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I just noticed that when exporting a nameless function from a route file, HMR requires a manual browser reload to reflect changes, so make sure you use named functions folks.
This is introduced when upgrading from
2023.4.5to2023.7.xas this also requires a @remix/dev upgrade from 1.17.1 to 1.19.1. I believe in 1.19.1, the remix team might have made changes to the manner future.v2_dev works in their config.Just more an FYI for anyone else that might be experiencing this.
Beta Was this translation helpful? Give feedback.
All reactions