React

1082 readers
1 users here now

A community for discussing anything related to the React UI framework and it's ecosystem.

https://react.dev/

Wormhole

[email protected]

Icon base by Skoll under CC BY 3.0 with modifications to add a gradient

founded 2 years ago
MODERATORS
51
 
 

This may be a very stupid question. But I was wondering if I should be using arrow function syntax or the classic function syntax for react components now or is this purely a style choice. I ask this purely as someone trying to work towards industry standards but have found a tremendous amount of mixed comments on it. Also is there any difference using typescript?

Example: const foo = () => {}

Or

function foo() {}

52
 
 

Here we can discuss everything related to React ecosystem ( including Next, Preact, etc. )

53
 
 

Definitely something to look into for more complex apps, I'm still trying to add it to Next.js but with all the /app dir migration stuff it's becoming a headache