brentvatne / react-native-overlay

An <Overlay /> component that brings content inside to the front of the view regardless of its current position in the component tree.
639 stars 79 forks source link

requireNativeComponent is not a function #28

Closed pbattisson closed 8 years ago

pbattisson commented 8 years ago

Hi I am getting the following error

screen shot 2015-11-06 at 16 14 51

It seems to be that the "requireNativeComponent" call is not working. I am using ReactNative 0.11.0 and iOS 9. Any ideas on howto resolve this?

joeferraro commented 8 years ago

@pbattisson replacing

var React = require('react-native');
var {
  View,
  PropTypes,
  StyleSheet,
  requireNativeComponent,
} = React;

with

var React = require('react-native');
var {
  View,
  PropTypes,
  StyleSheet
} = React;

var requireNativeComponent = require('requireNativeComponent');

in Overlay.ios.js resolves this issue.

pbattisson commented 8 years ago

That has worked, thanks @joeferraro

thewebdevelopment commented 1 year ago

Uncaught TypeError: (0 , _reactNative.requireNativeComponent) is not a function /node_modules/react-native-pager-view/lib/module/PagerViewNative.js tried above solution but no luck