Salvar No LocalStorage React

    const list = JSON.parse(localStorage.getItem("cart"))
    list.push(product);
    localStorage.setItem("cart", JSON.stringify(list));
Defeated Dogfish