fkhadra / react-toastify

React notification made easy 🚀 !
https://fkhadra.github.io/react-toastify/introduction
MIT License
12.38k stars 678 forks source link

How do you use useToastContainer? #505

Open stoplion opened 4 years ago

stoplion commented 4 years ago

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.

agcty commented 3 years ago

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

IzakJackson commented 3 years ago

Anyone managed to figure this out?

fkhadra commented 3 years ago

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.

IzakJackson commented 3 years ago

No problem, it's completely understandable 😊

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

Martinnord commented 3 years ago

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

agcty commented 3 years ago

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.

fkhadra commented 3 years ago

Hey @Martinnord, it would be awesome.

fkhadra commented 3 years ago

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

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

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.

Martinnord commented 3 years ago

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

shehan-mark commented 10 months ago

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.