Reputation: 23
I have just started to study Svelte. Just curious to know if you can import a Svelte component into a React project. A small hello-world example would suffice.
Upvotes: 0
Views: 1083
Reputation: 472
Looks like React can be used as smooth inculcation. And that is why, you can include one react component on existing page.
What about svelte? Maybe you are searching this: https://svelte.dev/docs#Component_format
import App from './App.svelte';
const app = new App({
target: document.querySelector('#server-rendered-html'),
hydrate: true
});
Upvotes: 1