2.4.6 โ€ข Published 1 year ago

@manojadams/react-hot-toast v2.4.6

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Features

  • ๐Ÿ”ฅ Hot by default
  • ๐Ÿ”ฉ Easily Customizable
  • โณ Promise API - Automatic loader from a promise
  • ๐Ÿ•Š Lightweight - less than 5kb including styles
  • โœ… Accessible
  • ๐Ÿคฏ Headless Hooks - Create your own with useToaster()

Change logs

  • Added ability to toast promises with optional success and error message

Installation

With yarn

yarn add react-hot-toast

With NPM

npm install react-hot-toast

Getting Started

Add the Toaster to your app first. It will take care of rendering all notifications emitted. Now you can trigger toast() from anywhere!

import toast, { Toaster } from 'react-hot-toast';

const notify = () => toast('Here is your toast.');

const App = () => {
  return (
    <div>
      <button onClick={notify}>Make me a toast</button>
      <Toaster />
    </div>
  );
};

Documentation

Find the full API reference on official documentation.

2.4.6

1 year ago

2.4.5

1 year ago