peggyrayzis / react-native-create-bridge

A CLI tool that bridges React Native modules & UI components with ease 🎉
MIT License
1.02k stars 63 forks source link

Please inform users that React.PropTypes.string no longer works. #55

Open vincentk42 opened 6 years ago

vincentk42 commented 6 years ago

Dev setup:

I am using create-bridge in a:

What you did:

followed the youtube tutorial and when i tried to run it in Ios, got an error "Cannot ready property 'string' of undefined.

I found out recently that in order to complete the tutorial, prop-types must be installed. The new code should look like this

exampleProp: PropTypes.string instead of

exampleProp: React.PropTypes.string

What happened:

Just thought i'd put it out there for people that are new to programming/react-native

dittmarconsulting commented 6 years ago

Also View.propTypes has been deprecated

View.propTypes -> ViewPropTypes import { ViewPropTypes, requireNativeComponent } from 'react-native'