Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AtomState::current() doesn't return the current value #1608

Closed
1 of 3 tasks
marc2332 opened this issue Nov 4, 2023 · 0 comments · Fixed by #1609
Closed
1 of 3 tasks

AtomState::current() doesn't return the current value #1608

marc2332 opened this issue Nov 4, 2023 · 0 comments · Fixed by #1609

Comments

@marc2332
Copy link
Contributor

marc2332 commented Nov 4, 2023

Problem

Fermi's AtomState::current() doesn't actually return the current value, it does the same thing as AtomState::get()
but it clons the inner value
Steps To Reproduce

  1. Create an AtomState
  2. Clone it and hold it in some event handler / async block, and do regular println!() on the value returned by .current()
  3. Modify it
  4. The value printed in 2. will still be the old one

Expected behavior

Print the new value

Environment:

  • Dioxus version: 0.4
  • Rust version: 1.73
  • OS info: Windows 11
  • App platform: freya

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant