Skip to content

Instantly share code, notes, and snippets.

@itzzmeakhi
Created January 11, 2022 09:19
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 itzzmeakhi/162bd93bdffbf5ee288dc445ca8a66f7 to your computer and use it in GitHub Desktop.
Save itzzmeakhi/162bd93bdffbf5ee288dc445ca8a66f7 to your computer and use it in GitHub Desktop.
// connectFn.js file
import React, { Component } from 'react';
const connectFn = (mapStateToProps, mapDispatchToProps) => {
return (WrappedComponent) => {
return class extends Component {
render() {
return (
<WrappedComponent />
);
}
}
}
}
export { connectFn };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment