agilgur5 / react-signature-canvas

A React wrapper component around signature_pad (in < 150 LoC). Unopinionated and heavily updated fork of react-signature-pad
https://agilgur5.github.io/react-signature-canvas/
Other
528 stars 115 forks source link

deps: change `prop-types` from peerDep to plain dep #102

Open lbfrancisco opened 8 months ago

lbfrancisco commented 8 months ago

prop-types aren't installed automatically when react-signature-canvas was installed.

image

agilgur5 commented 8 months ago

prop-types has been a peerDep practically since it was spun out of React 6 years ago: #3. So I'm not sure we should really change that without solid reason. Haven't heard a user complaint about it in those 6 years, even despite the ecosystem has changed how it handles peerDeps a few times now.

prop-types aren't installed automatically when react-signature-canvas was installed.

For instance, this behavior depends quite heavily on your package manager, and is not a bug of react-signature-canvas. If your package manager doesn't install peerDeps automatically, that is correct behavior.

It appears that the React team officially recommended it to be a dep shortly after its release though (https://github.com/facebook/prop-types/issues/44), so it could be moved, but I'd still think it be good to not have duplicate prop-types packages in a user's tree