a noob questions, arrow function or normal function for react components

i've always wondered what's the difference in using arrow function or just normal export default function Foo(props: SomeTypes){} over const Foo: FC<SomeTypes> = (props) => {} export default Foo? Couldn't quite understand the real benefit other than the this keyword scope or things like conciseness etc. Or is this really just a personal preference of oneself and the team?
4 Replies
Neto
Neto9mo ago
scope
Neto
Neto9mo ago
Acadea.io
YouTube
Ep3 - Arrow Function vs Normal Function in JavaScript
Visit https://acadea.io/learn for more lessons and content! Join my newsletter here to get the BEST updates: https://sendfox.com/acadea Support me on: https://www.buymeacoffee.com/acadea There are a few ways to define a function in JavaScript. Arrow function is the shorter way in contrast to the traditional syntax. But is that all there is to...
Neto
Neto9mo ago
still js at the end of the day
Aguilar
AguilarOP9mo ago
so it's really just like that i see thanks anyways hahha
Want results from more Discord servers?
Add your server