# with-hocs

> A higher-order component that compose other higher-order components

Latest version **1.0.0** (published 2018-09-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install with-hocs
pnpm add with-hocs
yarn add with-hocs
bun add with-hocs
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2018-09-14 |
| First published | 2018-09-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >8.0.0 |
| Dependencies | 2 |
| Unpacked size | 8.6 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Sung Won Cha |
| Maintainers | bluewings |
| Keywords | react, reactjs, hoc, recompose, compose, enhancer |

## Links

- npm: https://www.npmjs.com/package/with-hocs
- Repository: https://github.com/bluewings/with-hocs
- Homepage: https://github.com/bluewings/with-hocs#readme
- Issues: https://github.com/bluewings/with-hocs/issues
- npm.io page: https://npm.io/package/with-hocs

## Dependencies (2)

- [immutable](https://npm.io/package/immutable.md) ^3.8.2
- [memoize-one](https://npm.io/package/memoize-one.md) ^4.0.2

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2018-09-14

## README

# with-hocs


```jsx
function Sample(props) {
  return <h1>HELLO {props.capitalized}!</h1>;
}

// pass high-order components via hocs props
const Enhance = withHOCs({ importAs: 'hocs' })(Sample);

...

const hocs = [
  defaultProps({
    name: 'World',
  }),

  withPropsOnChange(['name'], ({ name }) => ({
    capitalized: name.toUpperCase(),
  })),
];

// <Enhance hocs={hocs} name="sydney" /> → HELLO SYDNEY!

```

---
_Source: https://npm.io/package/with-hocs · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
