Replies: 1 comment
-
I think this is possible. Yew supports multiple app roots, and mounting in specific elements. There's a related discussion, #2925, about creating web components from yew app, which you could then use in React. What's a bit harder to do is sharing one single context in all of your yew components or sharing between the React state and Yew state. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
Looking for a path to incorporate Yew into an existing React app piece by piece, a good strategy would be to reimplement a part of the app in Yew. This part has to be independent looking, so things like:
I've seen it's possible to mount a Yew app on a DOM element, so that's good.
Further, I probably need wasm-pack based build to just get a WASM.
Styling is provided through the host React app (tailwind)
What I'm currently thinking (but didn't get to do) is to have a "wrapper" react component, that mounts that WASM in its own holder DOM element. So my app can look like
Is that even possible or am I too optimistic?
Did anyone build such a generic way to embed Yew in React apps?
Beta Was this translation helpful? Give feedback.
All reactions