-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[Bug]: ReactiveUI Blazor OnActivate notification issue #4317
Copy link
Copy link
Closed
Labels
Description
Describe the bug 🐞
Since the major version upgrade to v23 RX Subscriptions that notify changes with RaisePropertyChanged inside WhenActivated does not update the ui correctly in the "setup phase".
Step to reproduce
I studied the new code and observed the following:
- WhenActivated is called (in OnInitialize of Blazor Lifecycle) and an rx chain is setup binding its output to e.g. a reactive property
- Blazor UI Rendering is done
- The Reactive property in 1. is updated
- ViewModel Change detection is setup (OnAfterRender of Blazor Lifecycle)
As the change detection is setup "last" the RaisePropertyChanged in 3. is not recognized and the UI does not show the "latest" state.
Therefore, the ViewModel change detection setup is performed too late and misses notifications.
Reproduction repository
https://github.com/reactiveui/ReactiveUI
Expected behavior
Notifications done in the WhenActivated code should not be missed in the setup phase. Maybe it would be possible to "buffer" all notifications until the change detection setup has finished.
Screenshots 🖼️
No response
IDE
No response
Operating system
Windows
Version
Windows 11
Device
PC
ReactiveUI Version
23.1.8
Additional information ℹ️
No response
Reactions are currently unavailable