react-svelte-components

Write Svelte components in Elm

Usage no npm install needed!

<script type="module">
  import reactSvelteComponents from 'https://cdn.skypack.dev/react-svelte-components';
</script>

README

Write React components in Svelte

This package makes it easy to turn Svelte code into React components.

Companies that use Svelte in production usually start with a single component. So if you want to use Svelte at work, start with a small experiment. Do people think it is nice? Do more! Do people think it sucks? Do less!

Example

Usage

After you have compiled an Svelte program to JavaScript, you can embed it in React like this:

import Svelte from 'react-svelte-components'
import { Todo } from '../dist/svelte/todomvc.js'

function render() {
    return <Svelte src={Todo} />
}