Is it possible to get a deep clone from a js_sys::Array? #4423
Unanswered
ronnybremer
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am using Yew in my project, together with wasm_bindgen.
A Vec is converted to JsValue (with serde_wasm_bindgen) and passed into a component as a Property. In order to preserve to original data I would like to create a copy of that JsValue object (which in my case is js_sys::Array).
Using clone() doesn't help as it only copies the reference to the original data.
Is there any way I can get a separate copy?
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions