Skip to content

Instantly share code, notes, and snippets.

@grabbou
Created October 26, 2015 17:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save grabbou/fe882d0671be1fc1e91e to your computer and use it in GitHub Desktop.
Save grabbou/fe882d0671be1fc1e91e to your computer and use it in GitHub Desktop.
import onlyUpdateForKeys from 'onlyUpdateForKeys';
const onlyUpdateForProps = (BaseComponent) => {
const propKeys = Object.keys(BaseComponent.propTypes || {});
return onlyUpdateForKeys(propKeys, BaseComponent);
};
export default onlyUpdateForProps;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment