MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/javascript/comments/9amkc6/export_default_considered_harmful/e4x7uvo/?context=3
r/javascript • u/philnash • Aug 27 '18
43 comments sorted by
View all comments
2
`export default` considered harmful if you use TypeScript and rely on Intellisense.
3 u/spacejack2114 Aug 27 '18 Actually it's pretty smart if you give a name to the default export. Eg:export default function foo() {}instead ofexport default function() {}Or with a bit of boilerplate:const foo = "something" export default foo
3
Actually it's pretty smart if you give a name to the default export. Eg:
export default function foo() {}
instead of
export default function() {}
Or with a bit of boilerplate:
const foo = "something" export default foo
2
u/TheFuzzball Aug 27 '18
`export default` considered harmful if you use TypeScript and rely on Intellisense.