The TODO app
Now, let's create our super fancy TODO app. You may be wondering why every blogger and book covers this example. Well, it is pretty easy to understand, and it can be used to visualize the concept. Are you wondering what we are going to build? The answer is a single-page interface, as follows:
Why does it say Rask Lege
? Well, it is just a name. In Norwegian, Rask Lege
means fast doctor. It is not relevant, but it's good to know.
Components
Let's build our components. We'll start by breaking our component down into the main component, the ToDo
list component, the AddTodo
component, and the Footer
component. The code must be self-explanatory.
App.js
is the main container component that gets the TODO states and passes them to the required components. We use the Redux connect
function to connect our container and components. This should make sense, having read Chapter 1, Understanding Redux. Let's examine our Todo.js
file, as follows:
//Todo.js
import React, { PureComponent } from "react...