# react-high-order-provider

> Create your react high-order component easily

Latest version **2.0.3** (published 2017-09-29) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install react-high-order-provider
pnpm add react-high-order-provider
yarn add react-high-order-provider
bun add react-high-order-provider
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.3 |
| Published | 2017-09-29 |
| First published | 2016-06-24 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 8 |
| Author | Zlatko Fedor |
| Maintainers | zlatkofedor |
| Keywords | react, provider, component, props, provide, high-order, react-component |

## Links

- npm: https://www.npmjs.com/package/react-high-order-provider
- Repository: https://github.com/seeden/react-high-order-provider
- Issues: https://github.com/seeden/react-high-order-provider/issues
- npm.io page: https://npm.io/package/react-high-order-provider

## Dependencies (1)

- [hoist-non-react-statics](https://npm.io/package/hoist-non-react-statics.md) ^2.3.1

## 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

- 2.0.3 (latest) — 2017-09-29
- 2.0.2 — 2016-10-26
- 2.0.1 — 2016-07-10
- 1.0.2 — 2016-06-24
- 1.0.1 — 2016-06-24

## README

# react-high-order-component

Create react higher-order components (providers) simply.

# Example

## Create your High-Order component

```js
import React, { PropTypes, Component, createElement } from 'react';
import highOrderProvider from 'react-high-order-provider';

@highOrderProvider
export default class Example extends Component {
  render() {
    const { originalProps, component } = this.props;

    return createElement(component, {
      ...originalProps,
      myAditionalProp: 123,
    });
  }
}
```

## Extend your component

```js
import React, { Component } from 'react';
import exampleProvider from './Example';

@exampleProvider
function MyComponent(props) {
  return (
    <input type="text" placeholder={props.myAditionalProp} />
  );
}
```

## The result will be

```html
<input type="text" placeholder="123" />
```

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