Hoisting in nextJs

Wondering if this can somehow be enabled?
const logHandler = () => handleFoo(); // 'handleFoo' was used before it was defined
const handleFoo = () => console.log('foo');
const logHandler = () => handleFoo(); // 'handleFoo' was used before it was defined
const handleFoo = () => console.log('foo');
I've seen some React projects that allow this, but I'm not sure how to enable it. (see pic)
3 Replies
Neto
Neto2y ago
hoisting is from javascript and not next itself
John
John2y ago
Isn’t it easier to just move function call after it’s defined Also yeah that’s not React Or Next thing, it’s basic Js
esponges
esponges2y ago
I know its JS but I wondered how in the example of the image which is a React project it's enabed
Want results from more Discord servers?
Add your server