React SetState from false to true of a specific element

I have a method called handleRetry which picks an item that i select.

This is the code

const [files, setFiles] = useState([]);

<Button onClick={() => handleRetry(file.temp_id)}>Retry</Button>

const handleRetry = (temp_id, error) => {
    const droppedFileError = files.find((file) => file.temp_id === temp_id);

This is my console.log of the droppedFileError, as you can see the error is set to true

enter image description here

How can i set this droppedFileError to false in the same handleRetry method?

81 thoughts on “React SetState from false to true of a specific element”

  1. Please let me know if you’re looking for a article writer for your weblog.

    You have some really good articles and I believe I would be a good asset.
    If you ever want to take some of the load off, I’d really like
    to write some content for your blog in exchange for a link back to mine.
    Please shoot me an email if interested.
    Many thanks!

  2. What i don’t understood is actually how you’re now not
    actually much more smartly-favored than you may
    be now. You are very intelligent. You recognize thus significantly on the subject of this matter, produced me personally consider it
    from numerous various angles. Its like men and women are not fascinated unless
    it’s something to accomplish with Lady gaga! Your personal stuffs excellent.
    At all times care for it up!

  3. Pingback: stromectol price
  4. Pingback: buy dapoxetine uk
  5. therapies comportementales et cognitives definition pharmacie auchan st jean de la ruelle horaire , therapie cognitivo-comportementale rabat pharmacie annecy carrefour , Ventoline pas cher, Ventoline livraison France. Ventoline pharmacie France Ventoline pas cher [url=]Ventoline livraison France[/url] therapie cognitivo-comportementale avis Cetirizine pharmacie Luxembourg, Acheter Cetirizine 5 mg pas cher. Cetirizine pharmacie Luxembourg Cetirizine pas cher [url=]Cetirizine pharmacie Luxembourg[/url] , pharmacie ouverte dimanche matin annecy medicaments sciatique , pharmacie angers de garde. pharmacie gare de triage argenteuil Acheter Zithromax 500 mg pas cher, Acheter Zithromax 500 mg pas cher. Zithromax sans ordonnance Suisse Zithromax pas cher [url=]Zithromax pharmacie Suisse[/url] , pharmacie place europe angers pharmacie de garde tarbes, pharmacie rue barthelemy danjou boulogne-billancourt medicaments janssen . pharmacie musset beauvais, parapharmacie leclerc jonchery pharmacie quais bordeaux pharmacie herboriste bordeaux .

  6. Pingback: prednisone 20mg

Leave a Comment