Example #1
0
        public static void Main()
        {
            var initialState = new TodoAppState
            {
                DescriptionInput = "",
                Visibility       = TodoVisibility.All,
                Todos            = new Todo[]
                {
                    new Todo
                    {
                        Id          = 0,
                        Description = "Learn React + Redux in C#",
                        IsCompleted = true
                    },
                    new Todo
                    {
                        Id          = 1,
                        Description = "Build an awesome app with them",
                        IsCompleted = false
                    }
                }
            };

            var store = Redux.CreateStore(Todos.Reducer(initialState));

            React.Render(Components.TodoItemList(store), Document.GetElementById("root"));
        }