-
Can I use lit with React,Vue,Svelte? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 2 replies
-
ReferenceError: window is not defined I got when I tried @svelte |
Beta Was this translation helpful? Give feedback.
-
Yes, it works with all of these frameworks. If you're having issues with Svelte I'd suggest sharing a minimal working repro on stackoverflow. |
Beta Was this translation helpful? Give feedback.
-
I got it. I made a mistake Thank you |
Beta Was this translation helpful? Give feedback.
-
I am facing problem in svelte which result in window is not defined
|
Beta Was this translation helpful? Give feedback.
-
Web Components work in any framework that can support HTML. Custom Elements Everywhere should tell you about integration issues with other frameworks. There may be some hoops you have to jump through in certain frameworks that don't expect web components in the server like NextJS, Nuxt, SvelteKit etc. The team is currently working on generating wrappers for frameworks such that it should be easier to integrate with their servers. If you're just looking for helper wrappers you can see an initial implementation of the react wrapper in @lit-labs/react. In the meantime stay tuned for helper wrappers for Angular and Vue as well as helper libraries for NextJS |
Beta Was this translation helpful? Give feedback.
Web Components work in any framework that can support HTML. Custom Elements Everywhere should tell you about integration issues with other frameworks.
There may be some hoops you have to jump through in certain frameworks that don't expect web components in the server like NextJS, Nuxt, SvelteKit etc. The team is currently working on generating wrappers for frameworks such that it should be easier to integrate with their servers.
If you're just looking for helper wrappers you can see an initial implementation of the react wrapper in @lit-labs/react. In the meantime stay tuned for helper wrappers for Angular and Vue as well as helper libraries for NextJS