-
-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Weird / destructive behaviour using mapActions service find between components #21
Comments
This is the expected behavior, the store relfect the result of the actions, if your action only get 1 object your store will have 1 object. You can see how combine the action and getter in the feathers chat vuex. Sorry for my English. |
Okey, but if I already downloaded some info and I know that I don't need to fetch it again from the server why I have to do it again? Whit the correct query to the store I can have always just the data that I need and use vuex as a database with just the info that I need on the front. Even this "database" can be cached on the client. |
Yeah, if you know that the action |
Sorry, I've been gone for a few days. This behavior could be expected with the 0.4 version of the plugin, but previous versions do not handle any removing of records, as far as I remember. Each query to |
I tried again version 0.3.0 and 0.3.1 and now all the data persists :D Probably I didn't removed correctly the 0.4.2. I still have to learn how to use breakpoints... |
Thanks for reporting back. It will take me some time to figure out a solution. |
I'm having a weird behaviour using find, this is how I'm using it:
I'm using feather-vuex 0.4.2, I also tried 0.3.1 and I get the same result.
First component
On the first component I do a find without a query, it returns all the results and store them on vuex.
Screenshot of Vuex state after find:
Second component
Now I do a get and after it the results fetched with the find are still in the store. Everything is fine here.
Third component
Now I do other find but with a custom query, I just want to find an element, the query works fine but it destroy the results of the first find :(
Is this a bug or the expected behaviour? I'm missing something?
The text was updated successfully, but these errors were encountered: