# babel-plugin-infer-extends-component

> Automatically extends React.Component for classes that include render method

Latest version **1.1.0** (published 2018-01-29) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install babel-plugin-infer-extends-component
pnpm add babel-plugin-infer-extends-component
yarn add babel-plugin-infer-extends-component
bun add babel-plugin-infer-extends-component
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2018-01-29 |
| First published | 2018-01-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | gabeklein |

## Links

- npm: https://www.npmjs.com/package/babel-plugin-infer-extends-component
- npm.io page: https://npm.io/package/babel-plugin-infer-extends-component

## Dependencies (1)

- [babel-types](https://npm.io/package/babel-types.md) ^6.25.0

## Recent versions

- 1.1.0 (latest) — 2018-01-29
- 1.0.1 — 2018-01-27
- 1.0.0 — 2018-01-26

## README

# infer-extends-component

> Automatically extends classes with `React.Component` that contain a render method.

## Install

```sh
npm install --save-dev babel-plugin-infer-extends-component
```

### Before

```js
import React from "react";

class FooBar {
    render(){
        return (
            <div>Hello World!</div>
        )
    }
}
``````

### After

```js
import React from "react";

class FooBar extends React.Component {
    render(){
        return (
            <div>Hello World!</div>
        )
    }
}
```

#### Override

If you do not want to extend `Component` simply extending any other class will work. Classes extending `undefined` explicitely will not `extend` anything even if they would otherwise trigger the transform.

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