From 420ebc982b65a0beda6537ee535f18998c1716fb Mon Sep 17 00:00:00 2001 From: Ken Jannette Date: Wed, 18 Apr 2018 16:27:33 -0400 Subject: [PATCH] Updated onSelectChange method --- src/App.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/App.js b/src/App.js index 0e6d826..fe848f1 100755 --- a/src/App.js +++ b/src/App.js @@ -26,8 +26,10 @@ class BooksApp extends React.Component { const shelf = e.target.value console.log(id, shelf) - this.setState((prevState) => { - prevState.filter(name === book.id) + this.setState((prevState, id) => { + prevState.filter(function(id == book.id) { + + }) }) }