View config getter callback for component "Iframe" must be a function (received 'undefined')

Viewed 1871

I am simply trying to use a library which uses youtube Iframe api internally. But I am getting the below error.

View config getter callback for component "Iframe" must be a function (received 'undefined').

I am quite new to React Native. If any body can help me to resolve the issue, I will appreciate that.

App.Js

import React, {Component} from 'react';
import {
  StyleSheet,
  View,
} from 'react-native';

import {
  Colors,
} from 'react-native/Libraries/NewAppScreen';
import Iframe from 'react-iframe'

export default class App extends Component {
  render(){
  return (
    <View>
      <Iframe url="http://www.youtube.com/embed/xDMP3i36naA"
        width="450px"
        height="450px"
        id="myId"
        className="myClassname"
        display="initial"
        position="relative"/>
    </View>
  );
          }
};

Library link:

https://www.npmjs.com/package/react-iframe

enter image description here

0 Answers
Related