Dynamic components in multiple crates #3843
-
|
I got the idea of having multiple was modules containing different components that can be loaded on demand. Is this possible using yew? I've read that one optimization is taht you split your code to reuse on multiple pages. ref My vision is that a component is declared in a crate that gets compiled to a wasm module. Lets call this one What im currently missing, is that i m not aware how the components are renderd or somehow placed in a wasm file, so that these components maybe dynamic loadable. Can someone give me me a hint if this is possible or blocked by something? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Loading another wasm module is complicated by several facts presented by wasm and ABI concerns that are currently very hard to work around.
There is, however, a solution that works. If you encapsulate your components as a web components. See also #1666 which covers a few of the finer points, as some rough edges have been worked out. |
Beta Was this translation helpful? Give feedback.
Loading another wasm module is complicated by several facts presented by wasm and ABI concerns that are currently very hard to work around.