React Dom not updating after updating a state array

so this function updates this state array:
let [Produits, setProduit] = useState(JSON.parse(Devis.produits))

 let changeQte = (id, e) => {
    let produittable = Produits;
    produittable.forEach((p) => {
      if ( == id) {
        p.quantityAchete = parseInt(;

the array did update without any problem but the changes aren’t getting re-rendered

  {console.log('rendering') , => (
            <div key={} className="product_column flex_center">
              <div className="productItem">{p.nom}</div>
              <div className="productItem">{p.category}</div>
              <div className="productItem">{p.prix_vente} DA</div>
                onChange={(e) => changeQte(, e)}

as you can see i’m loggin to the console to check if that line is getting executed and it does ! but the values rendered doesn’t update !

200 thoughts on “React Dom not updating after updating a state array”

  1. Pingback: is quinoa keto
  2. hi!,I like your writing very much! share we
    keep up a correspondence extra approximately your post on AOL?
    I require an expert on this house to solve my problem.
    May be that is you! Taking a look ahead to peer you.

  3. Thank you a bunch for sharing this with all people you really realize what you’re talking approximately!
    Bookmarked. Kindly also talk over with my web site =).

    We could have a link trade agreement between us

  4. Terrific work! This is the type of information that are
    supposed to be shared across the internet. Disgrace on the seek engines for now not
    positioning this post higher! Come on over
    and talk over with my web site . Thanks =)