React-native-admob: Not compatible with React Native 0.49.x

Created on 12 Oct 2017  路  4Comments  路  Source: sbugert/react-native-admob

React Native 0.49.1 has upgraded React to 16-beta which removes support for React.PropTypes.

I'm currently getting the following error:

undefined is not an object (evaluating "_react3.default.PropTypes.string)"

at RNAdMobBanner.js:63:30

You'll need to include the 'prop-types' npm and use this instead, as done in this PR in another project: https://github.com/oblador/react-native-shimmer/pull/12/files

Most helpful comment

Use the 2.0.0-beta for react 0.48+ support. Installable using yarn add react-native-admob@next or npm install --save react-native-admob@next

All 4 comments

+1 for this, unfortunately blocking us!

Use the 2.0.0-beta for react 0.48+ support. Installable using yarn add react-native-admob@next or npm install --save react-native-admob@next

See release notes for what has changed between 1.3 and 2.0: https://github.com/sbugert/react-native-admob/releases/tag/v2.0.0-beta.1

@koenpunt Thanks for the prompt reply, I'll try that tonight.
Might also be worth putting that note at the top of the Readme on the 1.x branch?

Was this page helpful?
0 / 5 - 0 ratings