 <p>You have to bind <code>startApp()</code> and <code>getWeather()</code> to the component, otherwise <code>this</code> would be <code>undefined</code>.</p> <pre><code>export default class Weather extends Component { constructor(props) { super(props); this.state = { forecast: {}, main: {}, weather: {}, }; this.setWeather = this.setWeather.bind(this); this.getWeather = this.getWeather.bind(this); this.startApp = this.startApp.bind(this); } ... } </code></pre>