DioxusLabs / dioxus

Fullstack GUI library for web, desktop, mobile, and more.
https://dioxuslabs.com
Apache License 2.0
18.5k stars 704 forks source link

Extend the subscriber list instead of overriding it; fixes subscribers added in mark_dirty #2319

Closed ealmloff closed 1 week ago

ealmloff commented 2 weeks ago

We have slightly wrong behavior when writing to a signal. If any subscriptions are added while marking a signal as dirty, they will currently be ignored. This PR changes behavior to add those subscriptions.

In practice, this edge case is very difficult to hit. You would need to read a signal in a memo then write to the signal and read the memo in the same render

Closes #2306