JakeSidSmith / react-fastclick

Fast Touch Events for React
https://www.npmjs.com/package/react-fastclick
MIT License
487 stars 41 forks source link

React as peer dep #40

Closed jondlm closed 7 years ago

jondlm commented 7 years ago

I think React should be in the peer deps instead of regular deps.

JakeSidSmith commented 7 years ago

I had considered this, but have had so many issues with peerDeps in the past I decided not to. I guess if I set it to "react": "*" then people shouldn't have problems resolving dependencies.

jondlm commented 7 years ago

Yeah peer deps are a pain but they do correctly represent the relationship react libraries share with with react.

The trouble with keeping it as a regular dep is that it could trigger some builds to install multiple copies of React, which is always a huge pain to diagnose, rather than getting a warning from npm/yarn about having invalid peer deps.

JakeSidSmith commented 7 years ago

How about I pin a specific version of React as a devDep (for testing), and set peerDep to *?

jondlm commented 7 years ago

Yeah, that's what I've seen work with other libraries 👍

JakeSidSmith commented 7 years ago

Going to release some changes today (including #42). I'll update the deps also. :)