react-toastify icon indicating copy to clipboard operation
react-toastify copied to clipboard

How do you use useToastContainer?

Open stoplion opened this issue 5 years ago • 10 comments

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.

stoplion avatar Jul 03 '20 20:07 stoplion

I need this too but the documentation for this hasn't been updated in some months.

agcty avatar Sep 25 '20 10:09 agcty

Anyone managed to figure this out?

IzakJackson avatar Nov 03 '20 14:11 IzakJackson

Sorry guys for the delay. The thing is that I'm working on several projects at the same time. I don't know when I'll be able to free some time(full-time jobs + covid + kids 😭). I can suggest that you look at the source right now to see how it's used internally. With a step back, I'm not satisfied with the implementation, that's why I'm a bit reluctant to document it.

fkhadra avatar Nov 03 '20 14:11 fkhadra

No problem, it's completely understandable 😊

I'll have a look through the source code. Thanks!

IzakJackson avatar Nov 03 '20 15:11 IzakJackson

@fkhadra Are PRs about updating the documentations about useToast and useToastContainer welcome?

Martinnord avatar Feb 08 '21 08:02 Martinnord

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.

agcty avatar Feb 08 '21 09:02 agcty

Hey @Martinnord, it would be awesome.

fkhadra avatar Feb 08 '21 09:02 fkhadra

@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.

fkhadra avatar Feb 08 '21 10:02 fkhadra

Okey cool. I've always wanted to contribute to OS. This could be a great start. Will try to submit a PR this weekend.

Martinnord avatar Feb 11 '21 08:02 Martinnord

Is there any update on this? I've looked through the current implementation of these two hooks. But I don't think we can do much using these hooks.

shehan-mark avatar Aug 23 '23 08:08 shehan-mark