Open
Description
Problem
When multiple events are handled without rerendering the state accessed in event callbacks is stale.
Steps To Reproduce
Steps to reproduce the behavior:
- Clone https://github.com/mohe2015/yew-bug
(cd frontend && trunk serve)
(cd tests && cargo run)
- Open browser console in opened firefox (note: firefox will automatically close after 30 seconds)
Expected behavior
I expected the browser console to contain username: username, password: password
but it contains username: username, password:
(password missing). When clicking on the login button again the correct text is shown. This is only an issue in Firefox but not Chromium.
From the logs it seems like a rerender is required to update the value in the handle.
Environment:
- Yew version: 0.20 until master are all affected
- Rust version: nightly
- Build tool, if relevant: trunk
- OS, if relevant: Linux
- Browser and version, if relevant: Firefox
Questionnaire
- I'm interested in fixing this myself but don't know where to start
- I would like to fix and I have a solution
- I don't have time to fix this right now, but maybe later