# Step 1.6 - Creating a state-driven UI (Demo) In React, the data travels in one direction: top-down in the form of state propagating down the component hierarchy. Only the component containing the state can change the state itself. When a UI interaction occurs, a stateful component must pass down an event handler to the UI component triggering the event in order to signal a state change. [Step #3 of "Thinking in React"](https://reactjs.org/docs/thinking-in-react.html) suggests finding the "minimal set of mutable state" that your application requires. So in this demo we are going to add that "minimal state" to our application and drive our UI off of that data. With that done, the next step will be to create ways to modify that state, which will in turn cascade down through our UI. This [reconciliation](https://reactjs.org/docs/reconciliation.html) process, figuring out what in your UI needs to change based on changing state, is what React excels at. ## Adding state to TodoApp Inside our `TodoApp` class, we will add the minimal state for our application, which includes just two keys: `todos` and `filter`. We don't need to worry about a `remaining` count because it can be calculated by counting the number of todos where the `completed` field is set to `false`. So here is our full constructor: ```jsx constructor(props) { super(props); this.state = { todos: { '04': { label: 'Todo 4', completed: true }, '03': { label: 'Todo 3', completed: false }, '02': { label: 'Todo 2', completed: false }, '01': { label: 'Todo 1', completed: false } }, filter: 'active' }; } ``` > You could also use an array to represent your todos. Array manipulation can be easier in some cases, but this object approach simplifies other functionality and will ultimately be more performant. ## Passing state through to UI Now we can pass `filter` and `todos` into our components. ```jsx render() { const { filter, todos } = this.state; return (