Observables - Many UmbBooleanState or use UmbObjec...
# package-development
w
Should I use multiple
UmbBooleanState
and
UmbStringState
on my context that others can observe as this info comes back as an object/response from a request to the server. Or is it better to put it all in an
UmbObjectState
instead ? Currently my ctx CTOR consumes document workspace ctx & observe's the unique (key/guid) and will make a new API request to the server and then I want to update my own observables with this info. Just wondering if separate observables is a problem with perf or anything or should I use the
UmbObjectState
instead?
Curious to know if there is a right/wrong way with this...
m
Without being 100% sure it feels like it would probably be easier with a single
UmbObjectState
. Having multiple different would only serve a meaningful purpose if you think that different "things" (mostly elements) would react to changes in the different observers in different ways. Not sure if what I'm trying to say make sense? 😄
w
Yeh kinda makes sense - I think for now and my simple brain as I keep hacking, playing & learning is to keep them seperate for now. Unless its a big NO NO or a red flag
11 Views