reselect icon indicating copy to clipboard operation
reselect copied to clipboard

Help wanted with ways to handle repetitive input-selectors

Open marceux opened this issue 10 years ago • 2 comments

I'm building out an application that has the potential to get pretty big pretty fast.

I'm beginning to repeat defining input-selectors across files that are meant to isolate other memoized selectors.

I'd abstract the input-selectors out to their own files and import them into the selectors that use them but I feel that's overkill given that they are rink-a-dink one liners.

Does anyone else have a similar issue with organizing their projects? Do you have any examples I can look at? Should I just bite the DRY-bullet and use these input selectors in every file and call it a day?

Thanks!

marceux avatar Jul 30 '16 22:07 marceux

Hey @marceux, sorry nobody followed up on this question, did you come to any conclusions? Personally, if I am repeating the same one liner selectors in many places I extract them into a module so it is easier to refactor if the state shape changes.

I'm going to close this now because it is not an actionable Reselect issue (come to think of it, this is probably more general than Reselect and applies to Redux too, so you might find a wider audience for this question by asking on stack overflow or reactiflux if you are still looking for answers).

ellbee avatar Sep 11 '16 13:09 ellbee

@ellbee Just want to thank you for your response.

Sorry for using "Issues" for a general question on organization. Appreciate the help.

marceux avatar Sep 12 '16 20:09 marceux