React: React-addons-test-utils needs older version of react-dom ?

Created on 13 Oct 2017  路  1Comment  路  Source: facebook/react

I installed the latest react-addons-test-utils (latest in npm) and also the latest version of react-dom (also npm). As react-dom is a dependency you would expect that this would do the trick.
However npm sends out warnings:

npm WARN [email protected] requires a peer of react-dom@^15.4.2 but none is installed. You must install peer dependencies yourself.

Do I really need an older version of react-dom be able to use the test-utils or is it ok to use the latest react-dom version?

I am using:

  • react@^3.7.2
  • react-dom@^16.0.0
  • react-addons-test-utils@^15.6.2

Most helpful comment

The test utils for 16 are included in React DOM. You can import them like so:import ReactTestUtils from 'react-dom/test-utils';

>All comments

The test utils for 16 are included in React DOM. You can import them like so:import ReactTestUtils from 'react-dom/test-utils';

Was this page helpful?
0 / 5 - 0 ratings