Huthaifa-Dev / project

Avoid using an element's index as the key prop JS-0437
Bug risk
Major
2 months ago2 years old
Do not use Array index in keys
217            {carts.map((cart, index) => {
218              console.log(cart.id);
219              return (
220                <option key={index} value={cart.id}>221                  Cart {index + 1} created at{" "}
222                  {new Date(cart.createdAt).toLocaleTimeString("en-US", {
223                    hour: "2-digit",