How to insert a canvas into the body ? #2223
Replies: 2 comments 3 replies
-
The Also, it seems your problem stems from not being able to get a reference to an element. See node refs for that. I assume you're using master Yew. If you're not, please look at the same pages but for 0.18: |
Beta Was this translation helpful? Give feedback.
-
On the plotters point, I remember someone saying that they used plotters with yew in our Discord, so I went looking :D I found that it was @saona-raimundo and the project is online_plotters which also has a hosted example on Github pages so you can see it in action. The project uses Yew Hope you don't mind the ping @saona-raimundo, just wanted you to get credit and know that your project might help the community too 🤗. |
Beta Was this translation helpful? Give feedback.
-
I failed to find a guide to creating&inserting a canvas. After reading the official book, I guessed and tested out that the inserting pattern might be somehow like
However, where to call its creating function (say
fn create_my_canvas
) puzzles me much.I found only one related example mount_point, but this example is far different from and inconsistent with the patterns shown in official book. Besides, this example compiled with errors saying that the crate
yew
has no functionstart_app_in_element
.Above all, my question would be threefold:
plotters
)Thanks for giving any guidelines.
Beta Was this translation helpful? Give feedback.
All reactions