josepot / redux-views

Like Reselect but with better support for shared-selectors

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Expanding SelectorCreator Types

helgenlechner opened this issue · comments

Hi @josepot! Thanks for creating this library.

We're currently using reselect heavily in one of our projects and are looking for an easier/higher-performance way to organize our selectors. Your library seems to really fit the bill, but I'm encountering a problem when using it. Some of our selectors have up to 16 input selectors, which is currently not supported by the types in this project. I haven't found a way to extend the types in our project internally, because of the way createSelector's type is defined. Would you be open to me creating a PR to define types for more input selectors? Or is there a way to extend the types within our project that I haven't found?

Hi @helgenlechner ,

As you may have noticed: I'm no longer actively improving/maintaining this library because I quit on using Redux more than a year ago... And I have to say that there is no coming back 😅. Anyways, that doesn't mean that the library doesn't work or that it can't be useful for those who are still using Redux. I think that the code is in good shape, we have good tests and the API is good, so I don't see any reasons why you shouldn't be using it. I just thought that it would be fair to let you know that this library is at the very bottom of my priorities ATM.

That being said: the typings of this library were written more than a year ago and TS has improved a huge deal since then. I'm pretty sure that it would be possible to have typings that support any number of parameters these days 🤔 I will try to find some time to improve the typings, but it will probably take me a few days or weeks, so yes, by all means, feel free to bit me at it: a PR would be very welcomed, of course!

Yeah, I saw that you hadn't been maintaining it. But it brings nice performance gains for our use case, not to mention the improved usability and I don't see us moving away from Redux anytime soon 🙃 Looks like the maintainers of reselect have started thinking about future directions, but that discussion hasn't really taken off yet.

Anyway, I'll open that PR soon! Thanks again.

@josepot Finally was able to open the PR we had discussed. Sorry, I was unable to work on this last week, but now it's done :)