Skip to content

Latest commit

 

History

History
25 lines (16 loc) · 746 Bytes

README.md

File metadata and controls

25 lines (16 loc) · 746 Bytes

svelte-react

Use React components inside Svelte apps.

<script>
	import ReactComponent from 'svelte-react';
	import Widget from './Widget.jsx';
</script>

<p>this is a React component inside a Svelte app:</p>
<ReactComponent this={Widget} children="child text" {...props} />

Limitations

ReactComponent does not accept any children or slots. If you want to specify children to the React component, you have to pass them in through the children prop.

Resources

This project was heavily inspired by react-svelte. If you want to use Svelte components inside React apps, have a look at react-svelte.

License

MIT