# babel-sugar-v-bind-sync

> Babel syntactic sugar for v-bind sync modifier support in Vue JSX

Latest version **0.2.4** (published 2022-04-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install babel-sugar-v-bind-sync
pnpm add babel-sugar-v-bind-sync
yarn add babel-sugar-v-bind-sync
bun add babel-sugar-v-bind-sync
```

## 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.2.4 |
| Published | 2022-04-16 |
| First published | 2021-02-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 139.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Mitscherlich |
| Maintainers | mitscherlich36 |
| Keywords | babel-plugin |

## Links

- npm: https://www.npmjs.com/package/babel-sugar-v-bind-sync
- Repository: https://github.com/Mitscherlich/babel-sugar-v-bind-sync
- Homepage: https://github.com/Mitscherlich/babel-sugar-v-bind-sync#readme
- Issues: https://github.com/Mitscherlich/babel-sugar-v-bind-sync/issues
- npm.io page: https://npm.io/package/babel-sugar-v-bind-sync

## Dependencies (2)

- [camelcase](https://npm.io/package/camelcase.md) ^6.3.0
- [@babel/plugin-syntax-jsx](https://npm.io/package/@babel/plugin-syntax-jsx.md) ^7.16.7

## 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.2.4 (latest) — 2022-04-16
- 0.2.3 — 2022-04-16
- 0.2.2 — 2022-03-18
- 0.2.1 — 2022-01-18
- 0.2.0 — 2022-01-13
- 0.1.1 — 2021-02-17
- 0.1.0 — 2021-02-14

## README

# babel-sugar-v-bind-sync

Syntactic sugar for v-bind `sync` modifier in JSX.

## Babel Compatibility Notes

This repo is only compatible with Babel 7.x, for 6.x please use [njleonzhang/babel-plugin-vue-jsx-sync](https://github.com/njleonzhang/babel-plugin-vue-jsx-sync)

## Usage

Install the dependencies:

```sh
# for yarn:
yarn add -D babel-sugar-v-bind-sync
# for npm:
npm install babel-sugar-v-bind-sync --save-dev
```

In your `.babelrc`:

```js
module.exports = {
  plugins: [require('babel-sugar-v-bind-sync')]
}
```

## Details

This plugin adds v-bind `sync` modifier to the JSX and tries to mirror the same behavior as in vue-template-compiler, with a few differences:

1. You should use underscore (`_`) instead of dot (`.`) for `sync` modifier (`prop_sync={this.bar}`).
2. It is recommended to use camelCase version of it (`propName_sync`) in JSX, but you can use kebab-case too (`prop-name_sync`).

```jsx
export default {
  data() {
    return {
      bar: 'naz',
    };
  },
  render(h) {
    return (
      <div>
        <component foo_sync={this.bar} />
      </div>
    );
  },
};
```

---
_Source: https://npm.io/package/babel-sugar-v-bind-sync · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
