udacity/reactnd-project-myreads-starter

[help] update/mutate State on click option

RanaivosonHerimanitra opened this issue · 2 comments

I'm trying to modify a specific book's shelf whenever an option tag is selected:

ui

The above code calls a custom props from a component ListBooks that looks like the following:
<ListBooks onChangeShelf={this.addTo} books ={this.state.books}/>

where addTo is a function which accepts 02 string inputs and is supposed to mutate my state:

addto

Issue: not sure that $set mutates my array according to log
PS: I'm using immutability-helper from npm

Any Hints?
A React Nano Student

There's an 'update' function in BookAPI to use?

Yeah, solved it ;)