I'm using javascript es5 + react 0.14.0.
I keep getting this warning when I do a simple render for the AvatarEditor component:
"React.createElement: type should not be null, undefined, boolean, or number. It should be a string (for DOM elements) or a ReactClass (for composite components). Check the render method of ImageCropper
."
var React = require('react'),
AvatarEditor = require('react-avatar-editor');
var ImageCropper = React.createClass({
render: function() {
return (
<AvatarEditor
image="http://example.com/initialimage.jpg"
width={250}
height={250}
border={50}
color={[255, 255, 255, 0.6]} // RGBA
scale={1.2} />
);
}
});
module.exports = ImageCropper;
Could anyone tell me what's happening and what I may be doing incorrectly? Really hoping to get started on this :(