React? e.g const Comp = () => vs function Comp() {}
I prefer const Comp = () => because: * const, can't be accidentally overwritten * Components usually only return some JSX or something right? So you rarely even need blocks
Not really, both are valid. I myself prefer using the first but there's not really a right/wrong way of declaring it
Обсуждают сегодня