Setting up the Store
We'll create a simple Todo List app, with a list of todos and a button to add a new todo.
Creating the state
Our Todo app state will be composed of 3 data structures, named as follows:
The basic UI
The app UI contains:
Synchronous actions
A synchronous action is a type of action that doesn't involve any asynchronous operations.
Handling action errors
We've seen how the TodoInput component dispatches
Asynchronous actions
The AddTodoAction previously described is a synchronous action.
Other improvements
Here's a set of changes you might ask your agent for, in one request:
Persisting the state
Finally, let's add a persistor to save the state to the local device disk.
Testing
Tests are how your agent checks its own work, and how you check what it did.
Full code
If you're interested in seeing the full code of Todo List applications that are even
Plain JavaScript objects
In the previous sections, we used ES6 classes to create the state.
Conclusion
This concludes the tutorial on how to create a Todo List application with Kiss for React.