bfanger / svelte-preprocess-react

Seamlessly use React components inside a Svelte app
MIT License
126 stars 6 forks source link

Autodetect React components based on .tsx and .jsx imports #3

Closed bfanger closed 2 years ago

bfanger commented 2 years ago

Instead of

<script>
import Counter from "$lib/old/Counter.jsx";
</script>

<react:Counter />

You'd be able to write:

<script>
import Counter from "$lib/old/Counter.jsx";
</script>

<Counter />
bfanger commented 2 years ago

The <react: prefix good indicator of which components are not "native" svelte components, but are in fact react components. (and would benefit from a conversion to svelte).