# The component-to-dashboard loop

1. Scaffold: `npx create-email@latest` creates a project with an emails/
   directory and example templates. Install dependencies.
2. Write the template as a React component in emails/, e.g. welcome.tsx.
3. Preview locally: the dev server shows the rendered email with desktop and
   mobile toggles, the source HTML, and the plain-text output. Changes hot
   reload. Use the linter and compatibility checkers in the toolbar before you
   call a template done.
4. Upload to Resend Templates with the Resend CLI so the team can collaborate
   on the template in the dashboard instead of passing files around.

## Checklist

- Author in React Email components, not hand-written HTML strings. The preview
  server, linter, and compatibility checks only exist in the component workflow.
- Preview on both desktop and mobile toggles. Email clients render differently
  and the toggle is the cheap way to catch breakage.
- Check the plain-text output too. Some recipients only ever see it.
- Uploading via the CLI is what makes the template a shared team asset. A
  component that only lives in one repo is not reviewable by the people who own
  the copy.