render() { const { current, item } = this.state; if (current.value === "editing" || current.value === "saving") { return ( <EditForm item={item} onSubmit={this.onSubmit} onCancel={this.onCancel} saving={current.value === "saving"} /> ); } return ( <> {current.actions && current.actions[0] && current.actions[0].type.startsWith("display") ? ( <Notification message={this.getActionContent(current.actions[0].type)} /> ) : null} <Item item={item} onEdit={this.onEdit} /> </> ); }