christopherdro / react-native-calendar

[DEPRECATED] Calendar Component for React Native
MIT License
536 stars 244 forks source link

Fix exceptions in React 16 for React.PropTypes being deprecated #162

Closed brianyamasaki closed 7 years ago

brianyamasaki commented 7 years ago

React 16 deprecates React.PropTypes in favor of a separate library 'prop-types'.

Trivial change, simply import PropTypes from 'prop-types instead of from React.

stianjensen commented 7 years ago

should prop-types also be added as a dependency in package.json?

brianyamasaki commented 7 years ago

I did not have to do that for any projects. I am guessing prop-types are a required package for React 16. I have the same sources building with React 15 with no problems.

On Thu, Sep 7, 2017, 2:14 PM Stian Jensen notifications@github.com wrote:

should prop-types also be added as a dependency in package.json?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/christopherdro/react-native-calendar/pull/162#issuecomment-327929373, or mute the thread https://github.com/notifications/unsubscribe-auth/ACiBmJM1wCW_BFY4PvTLvyewL-2NRG4xks5sgFy9gaJpZM4PKp6P .

stianjensen commented 7 years ago

Then I guess no change in yarn.lock should be needed.

hwaterke commented 7 years ago

Could this be merged?

stianjensen commented 7 years ago

I hope so! Let me know if you want me to make a new pull request for this.

coderdave commented 7 years ago

I already merged in https://github.com/christopherdro/react-native-calendar/pull/106 that had this fixed already.