https://github.com/resend/resend-nextjs-useactionstate-example
https://github.com/resend/resend-nextjs-useactionstate-example
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/resend/resend-nextjs-useactionstate-example
- Owner: resend
- License: mit
- Created: 2025-10-23T08:38:59.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2026-01-16T23:22:58.000Z (5 months ago)
- Last Synced: 2026-01-17T11:37:18.862Z (5 months ago)
- Language: TypeScript
- Size: 119 KB
- Stars: 2
- Watchers: 0
- Forks: 3
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Resend with Next.js
This example shows how to use Resend with [Next.js](https://nextjs.org) using the `useActionState` hook to handle form submissions.
## Deploy your own
Deploy the example using [Vercel](https://vercel.com):
[](https://vercel.com/new/clone?repository-url=https://github.com/resend/resend-nextjs-useactionstate-example&project-name=resend-nextjs-useactionstate-example&repository-name=resend-nextjs-useactionstate-example&env=RESEND_API_KEY)
## Instructions
1. Define environment variables in `.env` file.
```sh
cp .env.example .env
```
2. Install dependencies:
```sh
npm install
# or
yarn
```
3. Run Next.js locally:
```sh
npm run dev
```
4. Update the email address in the `components/form/actions.ts` file to your own email address.
## License
MIT License