Skip to Content
GuidesAdding a Component

Adding a Component

Reusable components live in app/components/.

  1. Create directory: app/components/NewComponent/.
  2. Create implementation: app/components/NewComponent/index.tsx.
  3. Define Props: Use an interface for props.
  4. Export: Export the component.
interface NewComponentProps { label: string; } export const NewComponent = ({ label }: NewComponentProps) => { return <div>{label}</div>; };

Remember to add TSDoc comments to public exports.

Last updated on