# @i18n-chain/taro

> ```bash yarn add @i18n-chain/taro

Latest version **0.8.0** (published 2020-05-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install @i18n-chain/taro
pnpm add @i18n-chain/taro
yarn add @i18n-chain/taro
bun add @i18n-chain/taro
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.8.0 |
| Published | 2020-05-19 |
| First published | 2020-01-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 7.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 35 |
| Author | 范文华 |
| Maintainers | fwh1990 |
| Keywords | taro-i18n, i18n-typescript, taro-i18n-typescript |

## Links

- npm: https://www.npmjs.com/package/@i18n-chain/taro
- Repository: https://github.com/fwh1990/i18n-chain
- Homepage: https://github.com/fwh1990/i18n-chain#readme
- Issues: https://github.com/fwh1990/i18n-chain/issues
- npm.io page: https://npm.io/package/@i18n-chain/taro

## Dependencies (3)

- [tslib](https://npm.io/package/tslib.md) ^1.10.0
- [@i18n-chain/core](https://npm.io/package/@i18n-chain/core.md) ^0.8.0
- [hoist-non-react-statics](https://npm.io/package/hoist-non-react-statics.md) ^3.3.1

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 0.8.0 (latest) — 2020-05-19
- 0.7.1 — 2020-04-07
- 0.7.0 — 2020-03-29
- 0.6.0 — 2020-03-29
- 0.5.2 — 2020-01-06
- 0.5.1 — 2020-01-05

## README

# Installation
```bash
yarn add @i18n-chain/taro

# OR

npm install @i18n-chain/taro
```

# Create i18n instance
Visit [Github Repo](https://github.com/fwh1990/i18n-chain) to get more information.

# Use with Hooks

```typescript jsx
// ./src/components/App.tsx

import Taro, { FC } from '@tarojs/taro';
import { useI18n, hack } from '@i18n-chain/taro';
import i18n from '../i18n';

const App: FC = () => {
  // For re-render when i18n switch locale
  useI18n(i18n);

  return <button>{hack(i18n).button.submit}</button>;
};

export default App;
```

# Use with Component

```typescript jsx
// ./src/components/App.tsx

import Taro, { Component } from '@tarojs/taro';
import { I18nProvider, hack } from '@i18n-chain/taro';
import i18n from '../i18n';

// Must use decorator in taro
@I18nProvider(i18n)
class App extends Component {
  return <button>{hack(i18n).button.submit}</button>;
};

// For re-render when i18n switch locale
export default App;
```

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