public void Setup() { _app = new ReduxApp <State>( new State { Value = "initial" }, Reducer, new[] { typeof(Effects) } ); }
public App(State state, Func <State, IAction, State> reducer, Type[] effects) { _subscriptions = new List <IDisposable>(); _app = new ReduxApp <State>(state, reducer, effects); var todos = _app.Store.Selector(s => s.Todos); _subscriptions.Add( todos .Selector(l => l.Length) .Where(c => c > 0) .Subscribe(OutputTodosCount) ); _subscriptions.Add( todos .Selector(l => l.TakeLast(3).ToArray()) .Where(l => l.Length > 0) .Subscribe(OutputTodosList) ); }