Answer the question
In order to leave comments, you need to log in
Is it possible to make vuex store unique per component?
Hello!
There is a component that displays some logic and Vuex is used there for convenience.
@foreach ($item in $items)
<mortgage-list
:sum="{{ $item->sum }}"
:min-fee="{{ $item->fee }}"
:key="{{ $item->id }}"
></mortgage-list>
@endforeach
Answer the question
In order to leave comments, you need to log in
The idea is, of course, stupid.
You should change the data structure in the storage so that you can store data for several mortgage-list instances at once. Make an object, the keys will be id (the ones you use as key). Well, values are objects with data for a separate instance. In the mortgage-list component itself, you need to add a calculated property, where the required object will be retrieved from the storage by id.
Or pervert something
like this https://codeburst.io/dynamic-modules-with-vuex-and...
key for everyone?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question