Skip to content
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

Improper setup of obsolete package react-hot-loader #2134

Closed
lindapaiste opened this issue Feb 26, 2023 · 0 comments · Fixed by #2218
Closed

Improper setup of obsolete package react-hot-loader #2134

lindapaiste opened this issue Feb 26, 2023 · 0 comments · Fixed by #2218

Comments

@lindapaiste
Copy link
Collaborator

While working on other features I have encountered a bunch of errors, warnings, and problems relating to the react-hot-loader package. This is a hindrance to the future development of this project and provides unnecessary obstacles to development.

Package is obsolete

The best way to fix all of these issues is to not use this package. The package itself recommends that you don't use it anymore:

React-Hot-Loader has been your friendly neighbour, living outside of React. But it has been limiting its powers and causing not the greatest experience. It's time to make a next step.

React-Hot-Loader is expected to be replaced by React Fast Refresh. Please remove React-Hot-Loader if Fast Refresh is currently supported on your environment.
source

Doesn't work most of the time

image
I usually see the "hot update was not successful" message and need to manually refresh the page.

Improper setup

image
I have seen an error related to using hot(App) and ReactDOM.render() in the same file. We are definitely doing that!

const HotApp = hot(App);
render(

Missing peer dependency

image
Here's the discussion on that issue

Can create other problems

image
Here's an issue that I encountered while working on the react-router code. The react-hot-loader package converts all components to a proxied version which breaks the router (discussion). I am able to work around this by writing the router code differently, but it's annoying.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants