Did your deps make upgrading to React 16.x hard too?

1 points by sammorrowdrums ↗ HN
I am struggling not to spout cliches about how the JS community make breaking changes constantly.

Up to now I was one of the proponents of how great the ecosystem is (these days). I have been deeply frustrated by the number of libraries that made major breaking changes across different React versions, without a straightforward upgrade path, so instead of being able to incrementally upgrade I've been forced to bulk upgrade and fire-fight and read all the documentation in one mega upgrade...

React itself has a really good deprecation / upgrade version support, but I inherited a codebase using react-router (complete paradigm shift across versions), redux, redux-saga and a bunch of other deps with code splitting and webpack too, and this has been painful unlike any other upgrade I've had to do too.

The hot reloading library was deprecated, there were changes in the history api, the router is no longer parsing query strings and also changing the signature of the properties routes create have changed... I could go on and on, there was even a breaking API change to react-select!

My point is not that breaking changes are a problem on their own, it's that I was left with the version change dilemma where breaking changes across 10s of deps were made without a straightforward deprecation / migration path in a single version of React and I ended up with little choice but to upgrade everything and work through all the issues, until the thing built correctly again...

Anyone else have a similar experience?

1 comment

[ 3.3 ms ] story [ 12.1 ms ] thread
As you've pointed out, none of that is really about React itself.

React-Router did completely change its API between version 3 and version 4, but my understanding is that version 3 is still maintained. So, you likely didn't _need_ to upgrade to v4.

React-Hot-Loader has always been something of an "experimental" tool. There's entirely too many edge cases around detecting components and trying to maintain state of component instances when hot reloading. The React team has suggested they have some ideas for ways to make hot reloading a better experience down the road. (Personally, I prefer to keep most of my state in Redux and use "plain HMR" [0], but I'm biased.)

It sounds like most of the issue here was really with React-Router. Were there other specific issues you ran into?

[0] https://blog.isquaredsoftware.com/2017/08/blogged-answers-we...