dioxus icon indicating copy to clipboard operation
dioxus copied to clipboard

When running a dioxus app, I get a console warning every time

Open rogusdev opened this issue 1 year ago • 1 comments

Problem

"using deprecated parameters for the initialization function; pass a single object instead"

This appears to be due to wasm_bindgen: https://github.com/rustwasm/wasm-bindgen/issues/4122 perhaps dioxus needs an updated wasm_bindgen (there was a bug that got fixed related to this) or else to use it differently?

Steps To Reproduce

  • dx new test # idk if router is required, but that's what I do, for web
  • dx serve
  • open the website, with the console open -- see the warning

Expected behavior

No warning should be logged

Environment:

  • Dioxus version: main
  • App platform: web

rogusdev avatar Mar 05 '25 16:03 rogusdev

I fixed this warning in Leptos here: https://github.com/leptos-rs/leptos/pull/3219

Might be able to use that to figure out how to fix it in dioxus. It was essentially replacing the parameters where you init the wasm binary in js with {module_or_path: "pathtowasm.wasm"} instead of "pathtowasm.wasm" (function may be called default or init).

paul-hansen avatar Mar 20 '25 17:03 paul-hansen