ryanseddon / react-frame-component

Render your React app to an iFrame
http://ryanseddon.github.io/react-frame-component/
MIT License
1.75k stars 156 forks source link

Component uses prop-types dependency but does not declare it as a dependency #243

Open wojtekmaj opened 1 year ago

wojtekmaj commented 1 year ago

Component uses prop-types dependency but does not declare it as a dependency resulting in app crashing if the user did not already install prop-types.

ryanseddon commented 1 year ago

It's listed as a peer-dependecy but I do know codesandbox complains it's missing, not sure if peer deps ever got ratified as an actual thing across different package managers

wojtekmaj commented 1 year ago

Yarn and PNPM do not install peerDependencies and npm's decision to install them is generally frowned upon. The safest bet is always to declare dependencies you use as, well, dependencies. A notable exceptions could be react and react-dom since you usually don't want to have multiple copies of that.