Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import React from 'react';
- const withPure = <P extends any>(
- WrappedComponent: React.ComponentType<P>,
- ): React.ComponentClass<P> => {
- class Purified extends React.PureComponent<P> {
- render() {
- return <WrappedComponent {...this.props} />;
- }
- }
- return Purified;
- };
- export default withPure;
Add Comment
Please, Sign In to add comment