# react-interpolate-plugin

> Smart interpolation for react components

Latest version **0.2.1** (published 2019-09-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-interpolate-plugin
pnpm add react-interpolate-plugin
yarn add react-interpolate-plugin
bun add react-interpolate-plugin
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.1 |
| Published | 2019-09-12 |
| First published | 2019-08-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 8.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Max Marinich |
| Maintainers | maxmarinich |
| Keywords | react, plugin, interpolate, interpolation, typescript, react interpolate, react interpolation |

## Links

- npm: https://www.npmjs.com/package/react-interpolate-plugin
- Repository: https://github.com/maxmarinich/react-interpolate-plugin
- Homepage: https://github.com/maxmarinich/react-interpolate-plugin#readme
- Issues: https://github.com/maxmarinich/react-interpolate-plugin/issues
- npm.io page: https://npm.io/package/react-interpolate-plugin

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

- 0.2.1 (latest) — 2019-09-12
- 0.2.0 — 2019-08-28
- 0.1.2 — 2019-08-28
- 0.1.1 — 2019-08-27
- 0.1.0 — 2019-08-27

## README

## React Interpolate Plugin

#### Smart interpolation for react components.

### Peer Dependencies
* React >=16.2

### API
*  `interpolate(key: string, params: Array<any>): string | Array<any>`  - Interpolate values with specified parameters

## How to use

```apacheconfig
npm i react react-interpolate-plugin
```

```javascript
    import React from 'react';
    import interpolate from 'react-interpolate-plugin';

    const key = 'Some {0} for {1} {2}.';
    const element = <span>smart</span>;
    const Component = () => <span>interpolation</span>;
    
    const Example = () => {
      return interpolate(key, ['text', element, <Component key="component" />])
    }

    
    // Result:
    // Some text for smart interpolation.
    
```


#### Test
```apacheconfig
npm test
```

#### License

MIT

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