Can @Injected objects be stateful? #243
kvr-guestlogix
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm having an issue where, when using the new
@Observable
macro on my view model, I can't pass in any observedvar
objects to a binding in my view because the view model isn't marked as@State
(it's being@Injected
via Factory).Is there a work around in getting
@Injected
objects to be marked as, or behave as,@State
objects? I know that usingContainer.shared.viewModel()
with@State
would work, but I'd prefer to use@Injected
if possible.Beta Was this translation helpful? Give feedback.
All reactions