how reculp value to local storage reacj js code example
Example: salvar no localStorage react
const list = JSON.parse(localStorage.getItem("cart"))
list.push(product);
localStorage.setItem("cart", JSON.stringify(list));
const list = JSON.parse(localStorage.getItem("cart"))
list.push(product);
localStorage.setItem("cart", JSON.stringify(list));