Package Exports
- woby-toast
- woby-toast/dist/index.es.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (woby-toast) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Woby-Toast
Ported from react-hot-toast
Smoking hot  Notifications for React.
 Lightweight, customizable and beautiful by default.
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()
Installation
With yarn
yarn add woby-toastWith NPM
npm install woby-toastGetting 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 'woby-toast';
const notify = () => toast('Here is your toast.');
const App = () => {
  return (
    <div>
      <button onClick={notify}>Make me a toast</button>
      <Toaster />
    </div>
  );
};