DEV Community

Discussion on: React functional components: const vs. function

Collapse
 
doctorderek profile image
Dr. Derek Austin 🥳

That's a fantastic tip, and I've also been tripped up by that particular thing. You also sometimes need () around the JSX, though Prettier will add it for you. I wrote an article about this topic: javascript.plainenglish.io/how-to-...