I've been wondering about the best convention for exporting components within a library context (such as @shopify/polaris) and for some reason (which I cannot articulate outside of "feels good") have always preferred to use the namespace keyword:
// src/components/Button/Button.tsx
export function Button () {}
export namespace Button {
export interface Props {}
} Tutuapp9AppsShowbox
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.