Skip to content

Commit

Permalink
Update use-toaster.mdx
Browse files Browse the repository at this point in the history
  • Loading branch information
timolins authored Mar 6, 2021
1 parent 2b8f7c1 commit 1ed8c8e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion site/pages/docs/use-toaster.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default ({ children, meta }) => <Layout meta={meta}>{children}</Layout>;

# `useToaster()` API

Create your own notifications with **headless mode**. It will provide you with the current state, so you can render on own components. Tree shaking is supported, so you won't ship any styles included in the library.
Create your own notification system with **headless mode**. The `useToaster()` hook will manage the notification state for you. This includes keeping track of all toast created with [`toast()`](/docs/toast), auto-dimiss, pause on hover and an unmount delay for exit animations. The hook will provide you with the current state, so you can render on own components. Tree shaking is supported, so you won't ship any unused styles from library.

It's recommended to only have one `<Toaster/>` or `useToaster()` in your app at a time. If you need the current state without the handlers, you should use [`useToasterStore()`](/docs/use-toaster-store) instead.

Expand Down

1 comment on commit 1ed8c8e

@vercel
Copy link

@vercel vercel bot commented on 1ed8c8e Mar 6, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.