State Type
BayramInanc opened this issue · 2 comments
BayramInanc commented
I am using class as my state. However Verge says, you cannot use class type for state type. Can we make it?
muukii commented
@BayramInanc
May I ask why you need to use class type first?
Including Verge, this kind of architecture would expect to use struct (value type) for the state.
Value type semantics make a copy of itself when it's been modified. we could then see what's changed in there using them old one and new one.
However, class works as reference type, we can apply modifications into them without copying.
seeing differences won't work.
BayramInanc commented
Thank you, I get what you mean, I will change state as value type.