“Could not find ”store“ in either the context or props” I'm getting this error while trying simple react-redux code
问题 This is my booklist container import React, {Component} from 'react'; import { connect } from 'react-redux'; class BookList extends Component{ renderList(){ return this.props.books.map((book)=>{ return( <li key={book.title}>{book.title}</li> ); }); } render(){ return( <ul> {this.renderList()} </ul> ) } } function mapStateToProps(state){ return{ books : state.books }; } export default connect(mapStateToProps)(BookList); This is my app.js file import React from 'react'; import { Component }