drcmda / react-contextual

🚀 react-contextual is a small (less than 1KB) helper around React 16s new context api
MIT License
642 stars 23 forks source link

Peer dependencies #5

Closed lourenc closed 6 years ago

lourenc commented 6 years ago

Hi, thanks for creating this lib!

Just wanted to clarify one interesting moment about peerDependencies. npm now shows a warning that react >= 16.3 is required, but the library itself is still using react-broadcast for createContext API (so it's actually fully operational with react 16.0.0).

npm i react-contextual warnings:

warning " > react-contextual@3.6.1" has incorrect peer dependency "react@>= 16.3.0".
warning " > react-contextual@3.6.1" has incorrect peer dependency "react-dom@>= 16.3.0".

The current package.json:

  "peerDependencies": {
    "prop-types": "15.x.x",
    "react": ">= 16.3.0",
    "react-dom": ">= 16.3.0"
  },
  "dependencies": {
    "react-broadcast": "^0.7.0-rc.4"
  }

I assume react and react-dom version in peerDependencies should be lowered to 16.0.0.

Thanks!

drcmda commented 6 years ago

@lourenc oops, you're right. I made a next branch some days ago to test against 16.3.0-alpha and carried over some commits, must've merged them in. I released a patch version.

lourenc commented 6 years ago

@drcmda Thanks a lot for a quick fix!