Migration
Migrate from React
How to migrate your React project to Zap.ts.
Migrating from React to Zap.ts
Zap.ts is built on top of Next.js, which itself is a React framework. This means that migrating from a React project to Zap.ts involves adapting your code to fit within the Next.js ecosystem.
Migration Steps
-
Convert to Next.js:
- Move your routes and pages into Next.js's file-based routing system under
src/app/
. Whether you used TanStack Router, React Router, or another routing library, the migration should be straightforward. - Update your imports and code to use Next.js conventions (e.g.,
next/link
,next/image
). - Follow the React to Next.js migration guide.
- Follow the Next.js to Zap.ts migration guide.
- Move your routes and pages into Next.js's file-based routing system under
-
Test and Refine:
- Run
bun install
to install dependencies. - Test your app and ensure all routes, and features work as expected.
- Refactor and take advantage of Zap.ts' plugin system.
- Run
Last updated on