Writing a value to a signal inside a `Closure` triggers infinite rerender warning
Closed this issue ยท 0 comments
wiseaidev commented
Sup! ๐
While working on a scroll-to-anywhere component for WASM frameworks, including Dioxus, I encountered an issue where updating a signal inside a wasm_bindgen::closure::Closure
leads to an infinite rerender warning being thrown.
However, the app behaves as expected, and no actual infinite loop occurs.
Steps to Reproduce:
- Clone this repo: https://github.com/opensass/scroll-rs/tree/main/examples/dioxus.
- Follow the steps in the README to set up the project.
- Observe the warning triggered in the console when the signal update happens inside the closure.
Expected Behavior:
No infinite rerender warning unless there's an actual issue.
Additional Info:
- The app works as intended despite the warning. Check out the deployed demo: https://scroll-rs-dioxus.netlify.app
- The issue could be related to how the closure interacts with the signal.
Would love your thoughts!
Best!