text: import React,{ Component } from 'react';
  import { connect } from 'react-redux';
  
  class BookDetail extends Component{
    render(){
      if(!this.props.book){
        return (
          <div>Select a book to get started.</div>
        )
      }
      return(
        <div>
          <h3>Details for:</h3>
          <div>{this.props.book.title}</div>
        </div>
      );
    }
  }
  
  function mapStateToProps(state){
    return{
      book: state.activeBook //Because the ActiveBook reducer produces the activeBook piece of state.
    };
  }
  
  export default connect(mapStateToProps)(BookDetail);
  