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

support for custom selectors #9

Closed
shanebdavis opened this issue Mar 10, 2022 · 3 comments
Closed

support for custom selectors #9

shanebdavis opened this issue Mar 10, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@shanebdavis
Copy link
Member

I'd like to add the ability to optionally select a subset of the H4R redux slice and only re-render when that subset changes:

const [use, {...}] = createReduxModule('example', {foo: 1, bar: 2}, {...})

const MyComponent = () => {
  const foo = use(({foo}) => foo) // doesn't re-render if bar changes
  return ...
}
@shanebdavis shanebdavis added the enhancement New feature or request label Mar 10, 2022
@mattcgenui
Copy link
Contributor

This should take care of it: #11

@shanebdavis
Copy link
Member Author

This is now in

@shanebdavis
Copy link
Member Author

shanebdavis commented Sep 19, 2022

@mattcgenui Thanks for this! I finally got this released as version 2.1. I want to add typescript support for this too, so I created a new issue for tracking that effort (#14).

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

No branches or pull requests

2 participants