-
I'd like to start porting a React app to Leptos. Q: Is it possible to port the app incrementally? I imagine that it should be possible using a rough approach such as |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Why are you interested in porting it? Generally speaking, mixing Framework A and Framework B is going to be an order of magnitude more complicated than writing it in A or writing it in B. The simplest way would probably be to create custom element/web component wrappers around Leptos components that you use for "leaf nodes" and slowly replace parts of your React app by embedding Leptos components inside React instead of the other way around. |
Beta Was this translation helpful? Give feedback.
Here's an example someone built doing what I described (turning Leptos components into web components/custom elements and using them in React): https://github.com/austintheriot/custom-element/tree/main/examples/leptos_in_react