redux-query-sync icon indicating copy to clipboard operation
redux-query-sync copied to clipboard

Possible to have one param depend on another?

Open denchen opened this issue 6 years ago • 1 comments

Let's say I have two query params: start & end. Is there a way to say, if start is passed in, then end must also be set, and vice versa, else unset both (or set both to default value)?

Since each param sends an individual action to the store with just that param, then the reducers only see one param set at a time, so I can't really do the check at the reducer level (unless I'm wrong about this?)

Is there some kind of solution or workaround to this?

denchen avatar Oct 10 '19 00:10 denchen

Unfortunately, there is currently no way to do this.

In #33 https://github.com/Treora/redux-query-sync/pull/33 solutions are discussed to enable processing parameter changes together.

Treora avatar Oct 16 '19 14:10 Treora