React-dates: react-addons-shallow-compare is unsupported now

Created on 11 Apr 2017  路  6Comments  路  Source: airbnb/react-dates

According to the latest release of React v15.5.0, they said that React Addons is discontinued support, including react-addons-shallow-compare. It seems that react-addons-shallow-compare is a significant dependency of react-dates, is there any plan to replace it with React.PureComponent? (as mentioned in the above link).

They also said that "it continue to work" in React v15.5.0 but I still want to know if there is any issue with react-dates :)

Thanks,

Most helpful comment

The only issue would be if React emits a deprecation warning; which it won't in this case since it's a separate package.

At such time as we drop support for React < 15.3, we'd certainly be able to use PureComponent; but until then, we'll just stick with the same version of the shallow compare package. There shouldn't be any issue.

All 6 comments

The only issue would be if React emits a deprecation warning; which it won't in this case since it's a separate package.

At such time as we drop support for React < 15.3, we'd certainly be able to use PureComponent; but until then, we'll just stick with the same version of the shallow compare package. There shouldn't be any issue.

Can we re-open this now that react16 is out and stopped updating the package? Its now supposed to be:

TestUtils have been moved to react-dom/test-utils
Shallow renderer has been moved to react-test-renderer/shallow

We are trying to upgrade to react16

I'm not sure what React 16 coming out changes? We still support React 0.14 and v15 (including v15.0-v15.2).

@ljharb The reason it changes things is because of compatibility. react-test-renderer and react-dom have both been updated to be compatible with react16 but react16 the old addons don't.

These tools still work with the older versions of react as far as I can, so updating to the properly maintained dependency instead of the old legacy ones should "Just work" and it'll allow people who are moving to react16 to continue to use react-dates properly

@sontek that sounds like a great idea then; want to submit a PR?

Update for those following this thread; I've replaced the dependency on react-addons-shallow-compare with enzyme-shallow-equal, to avoid the fbjs dependency, in bf7e334.

Was this page helpful?
0 / 5 - 0 ratings