I am trying to keep an image from reloading when the state changes.
The below image variable is passed into the props of a custom react component.
var img = new Image(); I've already set the src, title, desc, etc.
So my question is.
In the custom react component, how do I take the image object (now a prop titled img) and display it in the render function?
I've already tried
render: function(){
return <div>{this.props.img}</div>
}
But I keep getting a DOM elements are not valid child of React components error.