https://github.com/zheeeng/svelte-cross-frameworks
https://github.com/zheeeng/svelte-cross-frameworks
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/zheeeng/svelte-cross-frameworks
- Owner: zheeeng
- License: mit
- Created: 2022-08-25T05:34:56.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-12-11T13:13:42.000Z (over 2 years ago)
- Last Synced: 2025-09-27T03:00:03.828Z (7 months ago)
- Language: TypeScript
- Size: 77.1 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# svelte-cross-frameworks
Wrapper your Svelte component to React/Vue component
## 🔥 Features
* Bind the svelte component to the React/Vue world easily.
* Pass the reactive data as props to the svelte component.
* Listen to the events emitted from the svelte component.
* Use `onXXX` as the event callback by convention.
* Access svelte instance through `ref`.
* Typescript powered.
## 🧩 Installation
```bash
yarn add svelte-cross-frameworks (or npm/pnpm)
```
## 👇 Usage
```ts
import { createReactComponent, createVueComponent } from 'svelte-cross-frameworks'
import AwesomeSvelteComponent from './AwesomeSvelteComponent.svelte'
export const AwesomeSvelteComponentReact = createReactComponent(AwesomeSvelteComponent)
export const AwesomeSvelteComponentVue = createVueComponent(AwesomeSvelteComponent)
```