Skip to content
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

Data field in store cleared on subsequent failure - deliberate? #35

Open
azable opened this issue Sep 18, 2017 · 1 comment
Open

Data field in store cleared on subsequent failure - deliberate? #35

azable opened this issue Sep 18, 2017 · 1 comment

Comments

@azable
Copy link

azable commented Sep 18, 2017

I believe this is likely deliberate, but I've noticed the data field in the store is set to null when a subsequent action fails. This is problematic in scenarios where data is being updated and an update fails - in such a case it might be preferable to be able to elect to keep the data in place since it's not actually outdated (indeed the update failed).

Was this a deliberate design decision? Perhaps I'm not seeing a caveat in my logic here?

@eddyystop
Copy link
Collaborator

It was a design decision as, with null, there is no doubt the method call failed.

My sense is that you want to use the state as a one-record cache rather as wiring to Feathers. This would be similar to #24 where the suggestion was to write a custom reducer acting on the same FULFILLED and REJECTED actions. That reducer would maintain its own store referring to feathers-reducer's state.

It seems there are needs that sit on top of feathers-redux but I haven't had the time to clarify in my mind exactly what they are. As always, suggestions are welcome.

Also related is #22

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants