# tipddy-snackbar

> This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).

Latest version **0.1.95** (published 2022-10-20) · ISC license · 0 weekly downloads

## Install

```sh
npm install tipddy-snackbar
pnpm add tipddy-snackbar
yarn add tipddy-snackbar
bun add tipddy-snackbar
```

## 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.95 |
| Published | 2022-10-20 |
| First published | 2022-10-20 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 48.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Christian Lobarede Fernandez |
| Maintainers | christianlobarededev |

## Links

- npm: https://www.npmjs.com/package/tipddy-snackbar
- npm.io page: https://npm.io/package/tipddy-snackbar

## Dependencies (4)

- [@babel/cli](https://npm.io/package/@babel/cli.md) ^7.19.3
- [@babel/core](https://npm.io/package/@babel/core.md) ^7.19.6
- [@babel/preset-env](https://npm.io/package/@babel/preset-env.md) ^7.19.4
- [@babel/preset-react](https://npm.io/package/@babel/preset-react.md) ^7.18.6

## Recent versions

- 0.1.95 (latest) — 2022-10-20
- 0.1.94 — 2022-10-20
- 0.1.93 — 2022-10-20
- 0.1.92 — 2022-10-20
- 0.1.91 — 2022-10-20
- 0.1.9 — 2022-10-20
- 0.1.8 — 2022-10-20
- 0.1.7 — 2022-10-20
- 0.1.6 — 2022-10-20
- 0.1.5 — 2022-10-20
- 0.1.4 — 2022-10-20
- 0.1.2 — 2022-10-20
- 0.1.1 — 2022-10-20
- 0.1.0 — 2022-10-20

## README

<div align="center">

[**tippdy-snackbar**](https://tipddy.cl) is a notification library which makes it extremely easy to display notifications on your web apps. It is highly customizable and enables you to stack snackbars/toasts on top of one another.
</br>

</div>

## Table of Contents

- [How to use](#how-to-use)
- [Online demo](#online-demo)
- [Documentation](https://notistack.com/api-reference)
- [Redux / Mobx support](#redux-and-mobx-support)

## Getting Started

Use your preferred package manager:

```
npm install tippdy-snackbar
yarn add tippdy-snackbar
```

### How to use

**1:** Wrap your app inside a `SnackProvider` component:
<br />

```jsx
import { SnackbarProvider } from "notistack";
<SnackbarProvider maxSnack={3}>
  <App />
</SnackbarProvider>;
```

**2:** Export any component that needs to send notification using `withSnackbar`. By doing this, you'll have access to methods `enqueueSnackbar` and `closeSnackbar`, where the former can be used to send snackbars.

```javascript
import { withSnackbar } from "notistack";
class MyComponent extends Component {
  handleNetworkRequest = () => {
    fetchSomeData()
      .then(() => this.props.enqueueSnackbar("Successfully fetched the data."))
      .catch(() => this.props.enqueueSnackbar("Failed fetching data."));
  };
  render() {
    //...
  }
}
export default withSnackbar(MyComponent);
```

**2 (alternative):** You can use `useSnackbar` hook in your functional components as well.

```javascript
import { useSnackbar } from "notistack";
const MyButton = () => {
  const { enqueueSnackbar, closeSnackbar } = useSnackbar();
  const handleClick = () => {
    enqueueSnackbar("I love hooks");
  };
  return <Button onClick={handleClick}>Show snackbar</Button>;
};
```

### Online demo

**Visit [`documentation website`](https://notistack.com/examples) to see all the demos.**</br>
Or play with a minimal working example: [codesandbox](https://codesandbox.io/s/github/iamhosseindhv/notistack/tree/master/examples/simple-example??hidenavigation=1&module=%2FApp.js) </br>

### Redux and Mobx support:

notistack is compatible with state management libraries such as Redux and Mobx.

### Contribution

Open an issue and your problem will be solved.

### Author - Contact

Hossein Dehnokhalaji

<a href="https://www.instagram.com/iamhosseindhv"><img src="https://github.com/iamhosseindhv/Rentaly/blob/master/Gifs/instagram.png" alt="Hossein Dehnokhalaji Instagram profile" align="right" width="32" height="32"/></a>
<a href="https://www.linkedin.com/in/iamhosseindhv"><img src="https://github.com/iamhosseindhv/Rentaly/blob/master/Gifs/linkedin.png" alt="Hossein Dehnokhalaji Linkedin profile" align="right" width="32" height="32"/></a>
<a href="mailto:hossein.dehnavi98@yahoo.com"><img src="https://github.com/iamhosseindhv/Rentaly/blob/master/Gifs/contact.png" alt="Hossein Dehnokhalaji email address" align="right" width="32" height="32"/></a>

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