Closed HaswinVidanage closed 6 years ago
I get the error as following .
React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: object.
here's my code :
import React from 'react'; import './index.css'; var render = require("react-dom").render; var MessengerPlugin = require("react-messenger-plugin"); render( <MessengerPlugin appId="xxxxx" pageId="xxxxx" />, document.getElementById('root') );
I think my example in the README is bad since I'm using ES6 packages in the code. Try doing var MessengerPlugin = require("react-messenger-plugin").default; instead.
var MessengerPlugin = require("react-messenger-plugin").default;
I get the error as following .
React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: object.
here's my code :