DEV Community

Discussion on: Why the Div in React ?

Collapse
 
calag4n profile image
calag4n • Edited

I think the mistake is to put a render method inside your functional component .

Get rid of the line render() { (and obviously its closing curly brace) and that should work fine I guess.

Collapse
 
aaronsm46722627 profile image
Aaron Smith

Thanks for your feedback! You're absolutely right of course. I've edited the post accordingly.