https://github.com/dabapps/connect-hoc
Types for react-redux connect that work inside HOCs
https://github.com/dabapps/connect-hoc
Last synced: 3 months ago
JSON representation
Types for react-redux connect that work inside HOCs
- Host: GitHub
- URL: https://github.com/dabapps/connect-hoc
- Owner: dabapps
- License: bsd-3-clause
- Created: 2020-07-08T08:59:38.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-07T19:54:20.000Z (over 3 years ago)
- Last Synced: 2025-12-25T00:36:26.873Z (6 months ago)
- Size: 786 KB
- Stars: 0
- Watchers: 14
- Forks: 0
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# @dabapps/connect-hoc
**Types for react-redux connect that work inside HOCs**
## Install
```shell
npm i @dabapps/connect-hoc -P
```
(`-P` is shorthand for `--save-prod` and will add it to your `package.json` dependencies)
## Usage
```tsx
import { ConnectHOC } from '@dabapps/connect-hoc';
import { connect } from 'react-redux';
// ...
(connect as ConnectHOC)(
mapStateToProps,
mapDispatchToProps
)(MyComponent);
```
## Contributing
1. Clone the repo
2. Ensure you are using the correct version of node with [nvm](https://github.com/nvm-sh/nvm)
3. Install dependencies with `npm ci`
4. Make your changes
5. Run tests with `npm test`
6. Open pull request
## Code of conduct
For guidelines regarding the code of conduct when contributing to this repository please review [https://www.dabapps.com/open-source/code-of-conduct/](https://www.dabapps.com/open-source/code-of-conduct/)