gcanti / tcomb-form

Forms library for react
https://gcanti.github.io/tcomb-form
MIT License
1.16k stars 136 forks source link

Move React to peerDependecies and devDependencies #313

Closed maksis closed 8 years ago

maksis commented 8 years ago

Having React in dependencies causes confusing errors when people upgrade their projects to use React 15 due to multiple (conflicting) copies of React being loaded by the browser. Seems like this project used to have React in peerDepencencies but for some reason that was changed in https://github.com/gcanti/tcomb-form/commit/5834e925f303d603f5c616383656df223c96888e

Related discussion: https://github.com/JedWatson/react-select/issues/88

gcanti commented 8 years ago

Hi @maksis,

would it be correct to move react to peerDependencies and to add v15?

"dependencies": {
-  "react": "^0.14.0",
  "tcomb-form-templates-bootstrap": "^0.2.0",
  "tcomb-validation": "^3.0.0"
},
+"peerDependencies": {
+  "react": "^0.14.0 || ^15.0.0"
+}
maksis commented 8 years ago

You'll probably want a dev dependency as well for running the tests

gcanti commented 8 years ago

Released in https://github.com/gcanti/tcomb-form/releases/tag/v0.9.3