Package Exports
- svelte-cross-frameworks
- svelte-cross-frameworks/dist/index.cjs
- svelte-cross-frameworks/dist/index.mjs
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (svelte-cross-frameworks) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
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.
- Use
- Access svelte instance through
ref
. - Typescript powered.
🧩 Installation
yarn add svelte-cross-frameworks (or npm/pnpm)
👇 Usage
import { createReactComponent, createVueComponent } from 'svelte-cross-frameworks'
import AwesomeSvelteComponent from './AwesomeSvelteComponent.svelte'
export const AwesomeSvelteComponentReact = createReactComponent(AwesomeSvelteComponent)
export const AwesomeSvelteComponentVue = createVueComponent(AwesomeSvelteComponent)