feathers-redux icon indicating copy to clipboard operation
feathers-redux copied to clipboard

Feature Request: Reusing services for mutliple redux variables

Open testless opened this issue 6 years ago • 4 comments

Summary

  • [X] Tell us about the problem your pull request is solving.

At the moment, is it only possible to use a service once.

But there might be situations, where you want the same services being stored in different variables. At the moment, the code assume serviceName => variableName, thus providing a way of renaming the serviceName only. My proposal here is to variableName => serviceName, which would allow something like.

myUser -> users currentlySelectedUser -> users myBoss -> users

  • [X] Are there any open issues that are related to this?

No

  • [X] Is this PR dependent on PRs in other repos?

No

testless avatar Aug 21 '18 06:08 testless

However, this will be a breaking change.

testless avatar Aug 21 '18 06:08 testless

Ok, I thought about it a little bit and found a better non-breaking proposition.

User of your library could now use { '/users/:slug': ['myUser', 'currentlySelectedUser', 'myBoss'] }

testless avatar Aug 21 '18 06:08 testless

I will have to think on this.

I understand the issue and would prefer a more baked-in solution.

eddyystop avatar Aug 21 '18 10:08 eddyystop

What's the verdict on this, because it seems a good solution?

frinzekt avatar Mar 24 '21 06:03 frinzekt