esnet / react-timeseries-charts

Declarative and modular timeseries charting components for React
http://software.es.net/react-timeseries-charts
Other
861 stars 284 forks source link

react-hot-loader #373

Closed damonmaria closed 5 years ago

damonmaria commented 5 years ago

🐛Bug report

Describe the bug This package includes react-hot-loader as a dependency, rather than devDependency.

To Reproduce Install package.

Expected behavior react-hot-loader should not be included when I use this package.

watsoncj commented 5 years ago

react-hot-loader is used in some of the components as a prod dependency to test component types. Presumably because the RHL proxies the component types during dev which breaks === comparison.

pjm17971 commented 5 years ago

Yes, exactly, this code was added intentionally to fix hot loader usage for some people because class type comparison didn't work in their case. It's not perfect (I think it depends on them having the same version?) but it did seem to fix the problem for a number of people and the cost of having this being a production dependency was small.

timkrins commented 2 years ago

I spent a good few hours just now figuring out why my shiny new Webpack 5 HMR and modern React Fast Refresh (react-refresh) hot reloading wasn't working...

Deep debugging inside the React fiber rendering, I discovered something... Wha? A react-hot-loader Proxy! used by react-timeseries-charts...

An actual dependency on this development library is certainly unexpected!

Some search terms to help others find this so they don't have to spend as much time as I did: [HMR] Updated modules but no changes applied scheduleFibersWithFamiliesRecursively not applying updates react-refresh performReactRefresh does nothing

pjm17971 commented 2 years ago

Good times