Skip to content

Proper way to register custom type in store state? #1178

Discussion options

You must be logged in to vote

As a general advice:

Vue's reactivity work best with primitive data, that's true for both runtime and the types. And generally, it's also recommended to keep complex objects with side effects or complex internal state non-reactive, as you might get unintented side-effects when you make these object's properties reactive, depending on the internal interactions.

This specific issue is, as far as I can tell from the information provided, because of Generics not working too well with Vue's (type) unwrapping of refs when the generic could be a ref.

I can't pin it down for your types here as I don't know them all (i.e.: what's Int?), but generally, if a generic's specific value could potentiall…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@jdheeter
Comment options

@miquelromero
Comment options

Answer selected by posva
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants