Value comes back ‘undefined’ on first component render
I am attempting to do a book search with the ‘bookTitle’ that users type in or select from the page. On first render ‘bookTitle’ comes back undefined, which then pulls up some random kids book called ‘undefined’. By putting the bookTitle in the dependency array of my useEffect, i expected this issue to be resolved, but now this causes it to flash the undefined book, then the desired book, and then back to undefined.