You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 26, 2022. It is now read-only.
Repository navigation
This repository was archived by the owner on Jan 26, 2022. It is now read-only.
Why actually export something to satisfy the parsing goal? #3
Can you comment on why you decided to advise actually exporting something (export default null) as opposed to a no-op that satisfies the parsing goal (export {})? (I'm not entirely sure why, but I believe that's valid.) Do you think it more clearly indicates intent?
Can you comment on why you decided to advise actually exporting something (export default null) as opposed to a no-op that satisfies the parsing goal (export {})?
I think export default null is a bit more descriptive but they both accomplish the same goal.
I could add a shout out to both.
Thanks for the feedback. I think I personally would be a bit more inclined to do export {} (or something like export { /* noop */ } if I wanted to be more explicit), but since there's no hard requirement in terms of that I'll be keeping an eye out for what conventions (like your suggestion) emerge or get traction if this proposal moves forward. I don't know off the top of my head if there'd ever be any other reason to do export default null (though I'd expect it to be rare).
Activity
jdalton commentedon Jun 15, 2016
I think
export default nullis a bit more descriptive but they both accomplish the same goal.I could add a shout out to both.
jmm commentedon Jun 15, 2016
Thanks for the feedback. I think I personally would be a bit more inclined to do
export {}(or something likeexport { /* noop */ }if I wanted to be more explicit), but since there's no hard requirement in terms of that I'll be keeping an eye out for what conventions (like your suggestion) emerge or get traction if this proposal moves forward. I don't know off the top of my head if there'd ever be any other reason to doexport default null(though I'd expect it to be rare).jdalton commentedon Jun 15, 2016
I think you're right. I'll make the correction.
jmm commentedon Jun 16, 2016
Ok cool. That makes sense to me right now, but if some other convention turns out to be better I'd be all for it.