uno.extensions
uno.extensions copied to clipboard
[Reactive] Deprecate State.Empty
What would you like to be added:
Deprecate State.Empty
Why is this needed:
This is miss-leading of its behavior when used in VM for 2-way bindings on de-normalized entities, most of the time a State.Value(this, () => new T()) is what user are looking for (cf. https://github.com/unoplatform/uno.extensions/discussions/1163)
For which Platform:
- [x] iOS
- [x] Android
- [x] WebAssembly
- [x] WebAssembly renders for Xamarin.Forms
- [x] Windows
- [ ] Build tasks
Anything else we need to know?
We should also consider the possibility to add a State<T>.SOMETHING(this) when T has a parameter-less constructor. Quid of the right name of this method:
Defaultwould be misleading withdefault(T)Emptywould conflict with previous method and introduce a silent breaking change
Without State.Empty how would you represent a state that hasn't been set (equivalent of a null value)