Skip to content

Shiny.NotifyPropertyChanged vs Shiny.ViewModel for Persistence #1201

Answered by aritchie
jmichas asked this question in Q&A
Discussion options

You must be logged in to vote

Ok, so I can use Shiny.ViewModel and persist it as long as I call RememberUserState() for VMs that I want to persist with no changes to the [Reactive] properties? I don't need anything like [DataContract] [DataMemeber] to tell it to persist certain properties?

You only need to trigger a notify property change event (like the reactive attribute) and the viewmodel properties with get/set will be persisted and restored each time you visit that viewmodel that has RememberUserState turned on.

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by aritchie
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants