I applied the recommended migrations from Sycamore, but there is a strange error in the first-second commits, where a build error claims that a trait is not in scope even though it is imported a few lines previous. The error is present at commit b6ed12e:
Compiling sycamore v0.9.0-beta.2 (http://github.com/sycamore-rs/sycamore#16acf8eb)
error[E0599]: no method named `unchecked_ref` found for reference `&JsValue` in the current scope
--> ~/.cargo/git/checkouts/sycamore-c13e2e94d3a8109f/16acf8e/packages/sycamore/src/motion.rs:43:69
|
43 | f.borrow().as_ref().unwrap_throw().as_ref().unchecked_ref(),
| ^^^^^^^^^^^^^
|
= help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
|
3 + use wasm_bindgen::JsCast;
In sycamore, JsCast is imported in wasm_bindgen::prelude::*.
Modifying the relevant file in sycamore as suggested does fix the problem here, even though building sycamore causes an error due to duplicate imports.
I applied the recommended migrations from Sycamore, but there is a strange error in the first-second commits, where a build error claims that a trait is not in scope even though it is imported a few lines previous. The error is present at commit
b6ed12e
:In sycamore, JsCast is imported in
wasm_bindgen::prelude::*
.Modifying the relevant file in sycamore as suggested does fix the problem here, even though building sycamore causes an error due to duplicate imports.
The third commit references a fork of sycamore with the extra import.
I've asked on the sycamore discord about it