vlad-ignatov/react-numeric-input

React 16 compatibility

Closed this issue · 1 comments

ekohl commented

Now that React 16 is out it'd nice if the peerDependency allowed this. I think 15 and 16 are compatible but haven't tried it yet.

There is a weird issue when linking react-numeric-input to a project.

An error occurs when the component's state changes which indicates that there are versions of react 15 and 16 colliding.

Error screenshot

image

This seems to be related to the devDependencies react and react-dom. Please see the following console output screenshots:

In react-numeric-input:
image

and in my demo project (with npm link react-numeric-input):
image

When I use yarn in my demo project I even get following:
image

So it seems that the devDependencies version (^15.6.1) collides with my demo project's one (^16).

It only works after doing

npm remove --save --dev react react-dom
npm run build

in my local version of react-numeric-input.

So should we remove react and react-dom from the devDependencies or would this be a problem?