https://github.com/patrick-kw-chiu/mitosis-astrojs-starter
Run Mitosis compiled components (React.js, Vue.js and Svelte etc) in Astro.js
https://github.com/patrick-kw-chiu/mitosis-astrojs-starter
javascript mitosis react reactjs solid svelte vue vuejs
Last synced: 3 months ago
JSON representation
Run Mitosis compiled components (React.js, Vue.js and Svelte etc) in Astro.js
- Host: GitHub
- URL: https://github.com/patrick-kw-chiu/mitosis-astrojs-starter
- Owner: patrick-kw-chiu
- License: mit
- Created: 2024-08-31T00:57:32.000Z (9 months ago)
- Default Branch: master
- Last Pushed: 2024-09-14T04:07:26.000Z (9 months ago)
- Last Synced: 2024-10-01T10:21:25.031Z (8 months ago)
- Topics: javascript, mitosis, react, reactjs, solid, svelte, vue, vuejs
- Language: Astro
- Homepage: https://dev.to/patrickkwchiu/mitosis-using-astrojs-as-the-dev-server-to-preview-the-component-with-hot-reload-9jg
- Size: 254 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Mitosis Astro.js Starter

> Notice the inconsistent spacing between the `` box and the text. That is why it would be great to preview most (if not all) generated components at once!
This repo contains
- A starter [Mitosis](https://mitosis.builder.io/) component (`src/MyAwesomeComponent.lite.tsx`)
- An [Astro.js](https://astro.build/) app which has initialized with React.js, Vue.js, Svelte and Solid.js integration
- Scripts for development with hot-reload and wiring up the compiled Mitosis component to the Astro.js app### Development
1. Run the Mitosis development script in terminal 1
This script would `watch` for changes in `./src`. When a change occurs, it compiles the Mitosis component to downstream components and copies `cp` to `./test-app/src` for the Astro.js app to use.
```
npm run start
```2. Start the Astro.js test app in another terminal
```
cd test-app/
npm run start
```3. Update codes in `./src` 🔥