diff --git a/Runtime/State.cs b/Runtime/State.cs index 83fa651..767fd0e 100644 --- a/Runtime/State.cs +++ b/Runtime/State.cs @@ -97,7 +97,7 @@ public StateCollectionHolder(Lifetime lifetime, BuildContext context, Func::State"); + _stateAtom = Atom.Computed(lifetime, ComputeState); lifetime.Register(DeactivateState); } diff --git a/Runtime/View.cs b/Runtime/View.cs index fc3bd6e..cccdca1 100644 --- a/Runtime/View.cs +++ b/Runtime/View.cs @@ -49,7 +49,7 @@ protected Vector2Int Bounds { if (_bounds == null) { - _bounds = Atom.Value(Vector2Int.zero, debugName: "View.bounds"); + _bounds = Atom.Value(Vector2Int.zero); } return _bounds.Value; @@ -84,11 +84,9 @@ private void Initialize() return; } - _nextState = Atom.Value(ViewLifetime, null, debugName: $"View<{typeof(TState)}>({name})::State"); - _doRebind = Atom.Computed(ViewLifetime, DoRebind, debugName: $"View<{typeof(TState)}>({name})::Bind()", - keepAlive: true); - _doRender = Atom.Computed(ViewLifetime, DoRender, debugName: $"View<{typeof(TState)}>({name})::Render()", - keepAlive: true); + _nextState = Atom.Value(ViewLifetime, null); + _doRebind = Atom.Computed(ViewLifetime, DoRebind, keepAlive: true); + _doRender = Atom.Computed(ViewLifetime, DoRender, keepAlive: true); } void IView.SetSource(IViewState newSource, bool link) diff --git a/package.json b/package.json index 523988a..02a2582 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "com.codewriter.unimob.ui", "displayName": "UniMob.UI", "description": "A declarative library for building reactive user interfaces", - "version": "0.4.9", + "version": "0.4.10", "unity": "2019.3", "license": "MIT", "keywords": [