No message

This commit is contained in:
Ken Jannette
2018-04-19 10:23:56 -04:00
parent 420ebc982b
commit 7b035e123b
2 changed files with 4 additions and 8 deletions

View File

@@ -18,19 +18,17 @@ class BooksApp extends React.Component {
componentDidMount() {
getAll().then((books) => {
this.setState({ books })
console.log(this.state.books[0].id)
})
}
onSelectChange = (e) => {
const id = e.target.name
const shelf = e.target.value
console.log(id, shelf)
// console.log(id, shelf)
const changeShelf = this.state.books.filter((id) => this.state.books.id === id)
console.log("changeShelf", changeShelf)
this.setState((prevState, id) => {
prevState.filter(function(id == book.id) {
})
})
}
render() {

View File

@@ -6,8 +6,6 @@ class Bookshelf extends Component {
const books = this.props.books
const onSelect = this.props.onSelect
// console.log(books)
return (
<div className="list-books">