Skip to content

Cannot generate property without inherit from ObservableObject #327

Answered by Sergio0694
dhindrik asked this question in Q&A
Discussion options

You must be logged in to vote

Unfortunately no, this is not allowed by design. You have to either inherit from ObservableObject or use one of those attributes, as either will cause some additional helper methods to be generated, which the code for [ObservableProperty] needs. Maybe you could refactor your code to add eg. that attribute over your base viewmodel type, or something like that? 🙂

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@dhindrik
Comment options

Answer selected by Sergio0694
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