Open ArnoBuschmann opened 8 years ago
I made this a while ago, I'll check it out and update it tonight! On Mon, Apr 11, 2016 at 19:36 ArnoBuschmann notifications@github.com wrote:
Hi :)
When I use your component, I get this error message:
Uncaught Error: A valid ReactComponent must be returned.
Figured, this happens because React is considering the component only valid if its enclosed in div tags. So when changing your code as below, things work properly well.
return ( <div> <img {...this.props} style={style} src={this.props.src} onLoad={this.fadeIn} /> </div> )
— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/Legitcode/image/issues/6
Yep. It's useful, thanks for creating it.
I don't see this happening at all after testing. Any way you could provide a stack trace or some more code?
I'm going to close this in a couple days if no reply
Hi :)
When I use your component, I get this error message:
Figured, this happens because React is considering the component only valid if its enclosed in div tags. So when changing your code as below, things work properly well.