💻 Front-end developer 🔥 React Guru 🌟 Always hungry to learn 🚀 Always striving for excellence 💡 Bringing new ideas to the table 🔧 Building beautiful, user-friendly interfaces 🤓
My component was not showing up const MyComponent = () => {...} bc of this and its not gives error or something I searched what I'm doing wrong and finally saw that if u use { } u have to use return otherwise (...) . Thank you
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-...
Thanks, this is a really helpful, succinct, well written article.
Thank you 🎉
What an explanation mate!
Thanks and keep sharing such amazing stuff.
Glad I could help 🤓
I prefer "const" over function, but I don't like retyping the name of the component twice.
It's a tiny bit easier to write:
Than it is to write:
Thanks for the nice article! 😁
My component was not showing up const MyComponent = () => {...} bc of this and its not gives error or something I searched what I'm doing wrong and finally saw that if u use { } u have to use return otherwise (...) . Thank you
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-...
Interesting distinction, I'll keep this in mind when using const vs. function. Also, I appreciate the Dude Where's My Car joke!
Awesome with another DWMC-fan! Thanks for reading ^_^
thanks for the homemade analysis 👍
Good to know
Thank you
"And then? (any Dude where's my car fans here?)" Awesome! Thanks for exactly the article I needed! 🙏🦃
Haha finally! Thank you!
Can you please explain what is the actual difference of using Const and Function in the code.