2.5.1 • Published 5 months ago
react-hot-toast-stylex v2.5.1
react-hot-toast-stylex
A fork from timolins/react-hot-toast with facebook/stylex instead of goober
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 pnpm
pnpm add react-hot-toast-stylex
With NPM
npm install react-hot-toast-stylex
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-stylex';
const notify = () => toast('Here is your toast.');
const App = () => {
return (
<div>
<button onClick={notify}>Make me a toast</button>
<Toaster />
</div>
);
};
Original Documentation
Find the full API reference on official documentation.
2.5.1
5 months ago