# babel-plugin-transform-jsx-memo

> Memorize the JSX element.

Latest version **0.1.4** (published 2021-10-08) · 0 weekly downloads

## Install

```sh
npm install babel-plugin-transform-jsx-memo
pnpm add babel-plugin-transform-jsx-memo
yarn add babel-plugin-transform-jsx-memo
bun add babel-plugin-transform-jsx-memo
```

## 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.1.4 |
| Published | 2021-10-08 |
| First published | 2019-07-17 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 8.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | jsx-plus |
| Maintainers | zeroling |
| Keywords | babel-plugin |

## Links

- npm: https://www.npmjs.com/package/babel-plugin-transform-jsx-memo
- npm.io page: https://npm.io/package/babel-plugin-transform-jsx-memo

## 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.1.4 (latest) — 2021-10-08
- 0.1.4-0 (beta) — 2021-09-17
- 0.1.3 — 2019-08-07
- 0.1.2 — 2019-07-17
- 0.1.1 — 2019-07-17
- 0.1.0 — 2019-07-17

## README

# babel-plugin-transform-jsx-memo

Memorize the JSX element.

## Example

**In**

```jsx
import { createElement } from 'react';

export default function Foo(props) {
  const { message } = props;
  return (
    <div>
      Demo:
      <p x-memo>hello {message}</p>
    </div>
  );
}
```

**Out**

```jsx
import { createJSXMemo as __create_jsx_memo__ } from "babel-plugin-transform-jsx-memo/lib/runtime";
import { createElement } from 'react';
export default function Foo(props) {
  const {
    message
  } = props;
  return <div>
      Demo:
      {__create_jsx_memo__(() => <p>hello {message}</p>, 0)}
    </div>;
}

```

## Installation

```sh
$ npm install babel-plugin-transform-jsx-memo
```

## Usage

### Via `.babelrc` (Recommended)

**.babelrc**

```json
{
  "plugins": ["transform-jsx-memo"]
}
```

### Via CLI

```sh
$ babel --plugins transform-jsx-memo script.js
```

### Via Node API

```javascript
require("babel-core").transform("code", {
  plugins: ["transform-jsx-memo"]
});
```

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