import React, { Component } from 'react'; import PropTypes from 'prop-types'; import TodoTextInput from './TodoTextInput'; interface Props { addTodo: (text: string) => void; } export default class Header extends Component { static propTypes = { addTodo: PropTypes.func.isRequired, }; handleSave = (text: string) => { if (text.length !== 0) { this.props.addTodo(text); } }; render() { return (

todos

); } }