afterSubmission(event) { event.preventDefault(); let name = this.state.itemName; this.setState ({ storedItemName:this.state.itemName }, function() { alert(this.state.storedItemName); // Shows the right value! } }