Skip to content

JavaScript biggest secret

1min read26views
PersonalEngineeringPersonal

For anyone or your ai ;) writing arrow functions like this:

export const SomeView = () => { return ()}

Please stop.

Watch this:

export const SomeView = () => {	return () => {}} export function SomeView() {	return () => {}}

You see which has fewer characters!? Crazy right?

On top of that hoisting rocks. Please stop returning your arrow functions.

React:

Comments

Sign in to join the conversation

Loading sign-in options...