Sandesh Athreya
Sandesh Athreya

Reputation: 23

Can you include a Svelte Component in a ReactJS project?

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

Answers (1)

Stanislav  Sagan
Stanislav Sagan

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

Related Questions