RSS NEED NAME OF THIS COMPONENT

  • Thread starter Thread starter mohamedxp
  • Start date Start date
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 {}
}
Tutuapp 9Apps Showbox
 
Last edited by a moderator: