question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How do you use useToastContainer?

See original GitHub issue

I’m trying to create a custom Toast using Tailwind css. It looks like react-toastify exposes useToastContainer for the purpose. How do you use useToastContainer? Thanks.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:1
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

9reactions
fkhadracommented, Feb 8, 2021

@agcty react-hot-toast is a really cool library.

React-toastify provides more features just to name a few of them

  • custom animation out of the box (even easier with the latest version)
  • drag and drop
  • controlled progress bar

Is react-toastify better than react-hot-toast? I don’t think so. Open source is about diversity, use what works the best for you.

7reactions
agctycommented, Feb 8, 2021

To be honest, I just use https://react-hot-toast.com/ nowadays, it’s docs are superb and using the toast with custom styling works out of the box.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can i use react-toastify from hook? - Stack Overflow
1. Define ToastContainer inside the component · 2. Call toast.configure() once in your app. At the root of your app is the best...
Read more >
ToastContainer | React-Toastify - GitHub Pages
Props Type Default position string top‑right autoClose bool | number 5000 closeButton ReactNode | bool ‑
Read more >
react-toastify@9.1.1 - jsDocs.io
render?: ToastContent<T>;. Used to update a toast. Pass any valid ReactNode(string, number, component) ...
Read more >
Lazy container and multi-container | Material-React-Toastify
To enable multiple container support, you have to pass enableMultiContainer and specify a containerId and use it in each toast, to do so...
Read more >
fkhadra/react-toastify | src/hooks/useToastContainer.ts
export function useToastContainer(props: ToastContainerProps) {, 6×. 55, const [, forceUpdate] = useReducer(x => x + 1, 0);
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found