Skip to content

a fully customizable ReactJs toasting library that helps you build complex notification in your app.

License

Notifications You must be signed in to change notification settings

walidcherhane/rc-toastr

Repository files navigation

https://user-images.githubusercontent.com/56094829/197514874-b521164e-045e-4390-8db7-eaf13fc35150.png

downloads license version

Usage

import { ToastProvider } from 'rc-toastr'
import "rc-toastr/dist/index.css" // import the css file

ReactDOM.render((
    <ToastProvider>
        <App />
    </ToastProvider>
), document.getElementById('root'))
import { useToast } from 'rc-toastr'

const App = () => {
    const { toast } = useToast()
    const hello = () => toast.success("Hello World!")
    return <button onClick={toast}> Say Hello </button>
  }

export default App

Documentation:

For more information and examples feel free to check the official website at: dub.sh/rc-toastr