React Quickstart
Use this pre-built prompt to get started faster with React.
Alternatively, follow these steps to manually add ExpressCSV to a React app and relay validated rows to your backend.
-
Install the React SDK
-
On your backend: create a session endpoint 🔒
Create a small backend route that exchanges your ExpressCSV secret key for a short-lived session token. Your frontend will call this route right before opening the importer.
For example, in a Hono backend:
-
On your frontend: define your import schema
Start by describing the columns you want to accept. These labels and validation rules shape the importer experience.
You can also instead define your schemas in a shared package, which you use in both your frontend and backend. For this use,
@expresscsv/schemawhich is a lighter schema-only dependency that contains no frontend functionality. -
On your frontend: open the importer
This button fetches a fresh session token, opens the importer, and sends validated rows to your backend in chunks.
What's Next
- Types — define field types, validation rules, and TypeScript types
- Styling — theme the importer to match your app
- Delivery — relay records to your backend with
onData - Importer SDK — full option and return value reference