https://github.com/samhess/react2svelte
Fast React to Svelte migration
https://github.com/samhess/react2svelte
react-router svelte
Last synced: about 2 months ago
JSON representation
Fast React to Svelte migration
- Host: GitHub
- URL: https://github.com/samhess/react2svelte
- Owner: samhess
- Created: 2025-04-12T10:09:58.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-07-13T08:47:36.000Z (12 months ago)
- Last Synced: 2025-07-13T10:25:41.959Z (12 months ago)
- Topics: react-router, svelte
- Language: JavaScript
- Homepage:
- Size: 46.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# React Router to Svelte Conversion
This project serves as a SvelteKit starter template for a React Router to SvelteKit migration.
The migrated code will not be fully ready to run and is subject to review and formatting.
But, most of the (boring) work such as creating folders and files is done by the script.
## Prerequisites
- The React source project
- resides in the same parent directory as this project (../)
- uses React Router v7
- provides a _app/routes.ts_ file
- uses TypeScript JSX (tsx) route modules which are located in the _app/routes_ folder
- and it's source code is prettified with the options in _.prettierrc_
- import statements are single line expressions at the beginning of the file
## Converting route modules from React Router
```shell
cd scripts
npm run migrate 'reactRepoName'
npm run format
# fix issues manually until no syntax errors left
npm run typecheck
# fix remaining issues until code is ready to run
# start the dev server
npm run dev
```