# babel-stateless-jsx

> Babel plugin for stateless jsx files

Latest version **0.1.0** (published 2018-02-22) · ISC license · 0 weekly downloads

## Install

```sh
npm install babel-stateless-jsx
pnpm add babel-stateless-jsx
yarn add babel-stateless-jsx
bun add babel-stateless-jsx
```

## 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.0 |
| Published | 2018-02-22 |
| First published | 2018-02-22 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 104.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Mircea Moise |
| Maintainers | mircea.moise |
| Keywords | babel, react, jsx |

## Links

- npm: https://www.npmjs.com/package/babel-stateless-jsx
- Repository: https://github.com/mmircea16/babel-stateless-jsx
- Issues: https://github.com/mmircea16/babel-stateless-jsx/issues
- npm.io page: https://npm.io/package/babel-stateless-jsx

## Dependencies (3)

- [ramda](https://npm.io/package/ramda.md) ^0.25.0
- [babel-types](https://npm.io/package/babel-types.md) ^6.26.0
- [babel-plugin-syntax-jsx](https://npm.io/package/babel-plugin-syntax-jsx.md) ^6.18.0

## 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.1.0 (latest) — 2018-02-22

## README

## React stateless component plugin

This gives the ability to write pure JSX for stateless components, eliminating all the boilerplate needed to write one. Only writing JSX in a file is enough to define a stateless component:

```
<div> Hello {this.props.name}! </div>
``` 

Using the `.html.jsx` extension can be a way to highlight the files containing stateless components written in pure JSX

See `example` folder for an example of usage. 

### Features
 * Access `props`. Eg.: `<div> Hello {this.props.name}! </div>`
 * Use of other components. Using asttribute `__jsxpath` to reference where the component is from Eg.: `<div><Konnichiwa __jsxpath="./japanese" name="World"/></div>`

### Instalation

```bash
npm install babel-stateless-jsx
```

### Usage

The plugin needs to be added alongside other plugins and presets. An example of how to set it up in package.json is below:
```javascript
"babel": {
    "presets": [
      "babel-preset-env",
      "babel-preset-react"
    ],
    "plugins": [
      "babel-stateless-jsx"
    ]
  }
```

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