0👍
✅
If you make the following changes, it should work.
-
Your
renaissance
array doesn’t currently have a property calledid
, so I would change yourkey
toid
so that:key="item.id"
works -
passed the
id
to yourItem
component i.e.:id="item.id"
-
added a prop in your
Item
component i.e.id: Number
-
changed your localStorage keys to
"item-" + this.id + "-buy"
and"item-" + this.id + "-sell"
Now each buy and sell will have a different localStorage key, different by its id
.
I’d greatly recommend using Vuex, it will make things easier in the long run What is Vuex?.
Source:stackexchange.com