.Net 8 Blazor Server #3940
Unanswered
Bond-Addict
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Won't go into all the details of your question until after Christmas but here's some top level information Fody is an older way of generating boiler plate code. We have since recently implemented a source generator which generates boiler plate code around property notifications etc. it's much easier for us to maintain than a Fody. Observable Events generates IObserable for existing events mainly used for UI objects. Again not strictly needed. Just auto generates boiler plate code. Theres a lot of documentation in the repo. It's not part of the main reactiveui libraries so we don't explicitly mention it in the reactiveui documentation. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've been spinning my wheels looking at ReactiveUI, ReactiveUI.Fody, ReactiveUI.SourceGenerator and even Fody/PropertyChanged.Fody.
I cannot for the life of me figure out how to get it implemented. I've trying to find videos, combing through every piece of documentation on https://www.reactiveui.net/ or any question concerning those packages on StackOverflow. The documentation is extensive but also leave a lot of questions unanswered.
https://www.reactiveui.net/docs/getting-started/installation/blazor.html states:
Install ReactiveUI into your netstandard libraries and tests.
Install ReactiveUI.Blazor into your application.
Install ReactiveMarbles.ObservableEvents.SourceGenerator into your application.
Install ReactiveUI.Testing into your tests.
But then I never see mention of ReactiveMarbles.ObservableEvents.SourceGenerator again.
I've been to https://github.com/reactiveui/ReactiveUI.Samples/tree/main/blazor
But the server sample is only using ReactiveUI.Blazor but then includes FodyWeavers.xml.
Please help me understand how this all works. I've hit a total wall at this point and have spent several day now trying to figure out how this all connects.
This is my goal:
My Class flow is
(MainModel => FirstCollection) =>
(SecondModel => NestedProperty) =>
(ThirdModel => NestedProperty) =>
(FourthModel => SecondCollection) =>
(FithModel (Constains a bunch of properties and is the last model in the chain)
When any property of FithModel change, MainModel needs to be notified. Basically if there is any change, to any property anywhere in MainModel, MainModel should be notified. I then have a razor page with and EditContext that is watching MainModel. When MainModel detects that change,
EditContext.OnFieldChanged
should be triggered.Essentially when anything in MainModel changes I just want it to say "Hey! I changed!" I dont care what the actual value or what property changed, just that something changed.
My use-case:
We have a form which initially prepopulates via an existing record in our database. You have the ability to make form selection changes before generating a report. What happens currently, is that after a report has been generated (which creates a clickable report link in the form of a button) you can then go make a change to a form selection and then could accidently look at the previous report. I need to know every time any form selection changes, so I can clear out that link forcing the user to regenerate the report, creating a new report link.
It should be noted that this is an application that I inherited and thus had no input on the application architecture.
The goal is to have as minimal boilerpate code for change detection.
Thank you for your help! ❤️
Beta Was this translation helpful? Give feedback.
All reactions