# simple-react-button

> A simple ReactJS Button component

Latest version **2.0.0** (published 2019-02-07) · MIT license · 0 weekly downloads

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

## Install

```sh
npm install simple-react-button
pnpm add simple-react-button
yarn add simple-react-button
bun add simple-react-button
```

## Health

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

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2019-02-07 |
| First published | 2016-03-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Sanich Kotikov |
| Maintainers | sanich |
| Keywords | button, react-component, react, ui |

## Links

- npm: https://www.npmjs.com/package/simple-react-button
- Repository: https://github.com/cdrpro/simple-react-button
- Issues: https://github.com/cdrpro/simple-react-button/issues
- npm.io page: https://npm.io/package/simple-react-button

## 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

- 2.0.0 (latest) — 2019-02-07
- 1.3.0 — 2016-04-28
- 1.2.1 — 2016-04-07
- 1.2.0 — 2016-04-03
- 1.1.0 — 2016-03-30
- 1.0.0 — 2016-03-30

## README

# Button Component

A simple ReactJS Button component.

## Install

```bush
$ npm install simple-react-button --save
```

## Usage

```js
import React, { useCallback } from 'react';
import Button from 'simple-react-button';

const YourComponent = () => {
  const onTestClick = useCallback((event) => {
    return fetch().then(doSomething);
  }, []);

  return (
    <div>
      <Button onClick={onTestClick}>
        Button text
      </Button>
    </div>
  );
};

export default YourComponent;

```

## Props

```ts
interface IButtonProps {
  type?: 'button' | 'submit' | 'reset';
  disabled?: boolean;
  className?: string;
  onClick: <T>(event: React.MouseEvent<HTMLButtonElement>) => void | Promise<T>;
}
```

## License

MIT

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