I am trying to set two state variables when a user clicks an image, my browser thinks that I am calling a second function, how do I assign both of these variables? I know I can't use && but I don't know how to do it properly, sorry if this is a silly question.
<div className="img-wrap" key={doc.id}
onClick={() => (
setSelectedImg(doc.url) &&
setSelectedArtName(doc.artName))}
>
<img src={doc.url} alt={doc.artName} />
</div>