Adding a Component
Reusable components live in app/components/.
- Create directory:
app/components/NewComponent/. - Create implementation:
app/components/NewComponent/index.tsx. - Define Props: Use an
interfacefor props. - 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