render() { const { book, error } = this.state; if (error) { notify(error); return <Error statusCode={500} />; } if (!book) { return null; } return ( <div> <EditBookComp onSave={this.editBook} book={book} /> </div> ); }
const MyBook = ({ book, error }) => { if (error) { notify(error); return <Error statusCode={500} />;
render() { const { stories, page } = this.props if (stories.length === 0) { return <Error statusCode={503} />
render() { const { book, error } = this.state; if (error) { notify(error); return <Error statusCode={500} />; } if (!book) { return null; } return ( <div> <EditBookComp onSave={this.editBook} book={book} /> </div> ); }
render() { const { book, error } = this.state; if (error) { notify(error); return <Error statusCode={500} />; } if (!book) { return null; } return ( <div> <EditBookComp onSave={this.editBook} book={book} /> </div> ); }
render() { const { book, error } = this.state; if (error) { notify(error); return <Error statusCode={500} />; } if (!book) { return null; } return ( <div> <EditBookComp onSave={this.editBook} book={book} /> </div> ); }
render() { const { book, error } = this.state; if (error) { notify(error); return <Error statusCode={500} />; } if (!book) { return null; } return ( <div> <EditBookComp onSave={this.editBook} book={book} /> </div> ); }
render() { const { book, error } = this.state; if (error) { notify(error); return <Error statusCode={500} />; } if (!book) { return null; } return ( <div> <EditBookComp onSave={this.editBook} book={book} /> </div> ); }
const MyBook = ({ book, error }) => { if (error) { notify(error); return <Error statusCode={500} />;
const MyBook = ({ book, error }) => { if (error) { notify(error); return <Error statusCode={500} />;
const MyBook = ({ book, error }) => { if (error) { notify(error); return <Error statusCode={500} />;
const MyBook = ({ book, error }) => { if (error) { notify(error); return <Error statusCode={500} />;
const MyBook = ({ book, error }) => { if (error) { notify(error); return <Error statusCode={500} />;