Sep 28, 2022
I definitely prefer default exports for React components, because it enforces a standard:
1-- Only export a single component from any given .tsx file
2-- Subcomponents inside the same file are NEVER exported
I definitely prefer default exports for React components, because it enforces a standard:
1-- Only export a single component from any given .tsx file
2-- Subcomponents inside the same file are NEVER exported
Hi, I'm Doctor Derek! I've been a professional web developer since 2005, and I love writing about programming with JavaScript, TypeScript, React, Next.js & Git.