They Finally Released This Toast Library

Поділитися
Вставка
  • Опубліковано 19 сер 2024
  • Toast notifications are little messages that pop up for any success, error, or loading events. Their only purpose is to let users know what is currently happening in your app. This one might just be my new favorite.
    Sonner 1.0 Release: sonner.emilkow...
    -- my links
    Discord: / discord
    GitHub: github.com/jos...

КОМЕНТАРІ • 102

  • @saar5947
    @saar5947 10 місяців тому +36

    I love how much effort you put in, all for just a Toast library. Keep it up.

  • @sujjeee
    @sujjeee 10 місяців тому +39

    Hey josh can you please make video on multi tenancy?. How to implement it with next js 13. Please I'm waiting it for so longgg.

  • @JerrenT
    @JerrenT 10 місяців тому +7

    code animation at 3:22 is really nice. good stuff

    • @joshtriedcoding
      @joshtriedcoding  10 місяців тому

      Thanks for noticing, really like the style too

  • @rjwhite4424
    @rjwhite4424 10 місяців тому +1

    dude you literally rock. You tell me what's new and poppin in the npm world and it only makes my life easier when developing

  • @quickkcare605
    @quickkcare605 10 місяців тому +2

    00:04 Sonor 1.0 is a new tool for easily creating toast notifications
    00:40 React Hot Toast and Shad CN's built-in toast offer the best of both worlds.
    01:18 React Toastify does not match the style of the UI library
    01:53 The toast API in the UI library I prefer has a different and more customizable structure compared to React Hot Toast.
    02:27 The API is similar to React Hot Toast.
    03:03 Toasts are rendered based on a state that is mounted to true.
    03:38 React Query is a library that works well with toast notifications.
    04:14 React Query and TOS Notification Library Integration

  • @MihirAmanRaj
    @MihirAmanRaj 10 місяців тому +1

    LOL, I just used it today unknowingly that it was actually new, but yeah it is a really nice library to work with, easy to make, and style.

  • @radjee8600
    @radjee8600 10 місяців тому

    As usual very clean thoughts about a precise subject, thanks man for your good work !

  • @LC12345
    @LC12345 10 місяців тому +5

    Josh only reviews German-named packages by this point

  • @codewithguillaume
    @codewithguillaume 10 місяців тому

    Dude I love this lib !

  • @jonathanrees47
    @jonathanrees47 10 місяців тому

    Great video!
    Having toast notifications managed so elegantly with one library is an easy win right there.
    I wish Angular had the same kind of UI library support that React has.

  • @Chris-zt4ol
    @Chris-zt4ol 10 місяців тому

    Love the fact that it has a headless option but keeps the animation and expand functionality - something that always made hot toast very hard to customize

  • @Pareshbpatel
    @Pareshbpatel 2 місяці тому

    Nice overview of React Toast Notification Libraries, in particular, sonner 1.0. Thanks, Josh
    {2025-06-07}

  • @directornovela7774
    @directornovela7774 10 місяців тому

    This was really helpful man, thanks a lot.

  • @fabre6733
    @fabre6733 10 місяців тому

    FYI, onSuccess and onError is going to be deprecated in react-query future versions

  • @RolandAyala
    @RolandAyala 4 місяці тому

    Amazing how many people don't seem to realize shadcn is just tw styled radix, or talk about it like is a component library.

  • @lovrozagar3729
    @lovrozagar3729 10 місяців тому

    Josh, please do a headless Shopify/Bigcommerce full project tutorial with auth, payment and deployment. Currently there is no in-depth tutorial for this anywhere on youtube.
    Thanks 😀

  • @xhurish
    @xhurish 10 місяців тому

    The biggest thing sonner has over shad cn is the fact that you can have multiple toasts and that when you hover they read out like that, other than thst no reason to use it over shads as the shads one is by fefault linked to your color scheme and can also take a description besides tbe title

  • @ParkourGrip
    @ParkourGrip 10 місяців тому +2

    Does it do anything to make sure the toasts disapear when you navigate to a new screen? I usually wrap react-tostify into my own toast solution. It consists of a ToastProvider component inside witch one can render toasts using "const toast = useToast(); toast.error('Test!');" The trick is that all toasts that got spawned inside a ToastProvider automaticaly get closed when that provider is unmounted. This way i can make sure that every screen of the aplication uses a different toast provider and i never have to think about manualy closing toasts again.

  • @piotrrodzen772
    @piotrrodzen772 10 місяців тому

    Loving how easy is to use it

  • @mnik0128
    @mnik0128 10 місяців тому

    Also we can make this synergy between axios/ky and toats library.

  • @ernst367
    @ernst367 10 місяців тому

    Thanks Josh, will give a try soon

  • @samobanijesu
    @samobanijesu 3 місяці тому

    When I used this sooner library, the toast displays along with it's Id. How do I work around that??

  • @cherryfuchs
    @cherryfuchs 10 місяців тому

    Another amazing video, Josh. Congratulations!! Do you have a toast library recomendation for React Native?

  • @amraromoro
    @amraromoro 10 місяців тому

    thanks Josh for the big efforts i just wonder if i could use NextJs as a Microservices and Microfronts in the same time as i could build a service in one project with its database and then start a new service and connect them together with event-driven architecture for example is it possible.

  • @Arab_motivation_video
    @Arab_motivation_video 8 місяців тому

    Sounds cool gonna try this!

  • @wglint7509
    @wglint7509 10 місяців тому +2

    Someone know how can we make animation code like this video in 3:21 or 3:31 ?
    Thanks in advance for answer ;) and great video like everytime !
    And the better toast UI is toastify for me, i have promise toast and it's very easy to use !

    • @1weiho
      @1weiho 10 місяців тому

      I think is Snappify!

  • @charliesta.abc123
    @charliesta.abc123 10 місяців тому

    Lol I just got done customizing my Shadcn toast component. Let me check Sonner out.

  • @otaviofaria5893
    @otaviofaria5893 9 місяців тому

    Hi, I want to learn more about how to create components and I love the way you did it, could you teach me or make a video on how to do it? This way you can render using a function I liked

  • @XboxArqain
    @XboxArqain 10 місяців тому +1

    Notistack doesn't get a mention?

  • @marcofaquim
    @marcofaquim 10 місяців тому

    Mr Josh we need the nextjs shopify full tutorial

  • @kazi-shariful-islam
    @kazi-shariful-islam 10 місяців тому

    This is really awesome

  • @bearbricknik
    @bearbricknik 10 місяців тому

    Great video! Do you know if you can use custom styling with tailwind classes? As of right now I think you can only specify hex color codes under style for for example the background color but since I am using a light and dark mode, I configured a specific color for it in my tailwind.config named bg-background-theme but trying to apply this color doesnt work, at least for me

  • @user-id9iq9gc3d
    @user-id9iq9gc3d 10 місяців тому

    Thanks for sharing!

  • @sattlerdevelopment
    @sattlerdevelopment 10 місяців тому

    this for vue would be epic

  • @MathewNiania
    @MathewNiania 10 місяців тому +1

    Word of warning: onSuccess and onError API is being depreciated

    • @kamehameha38
      @kamehameha38 10 місяців тому

      It already deprecated in the latest version

  • @SumitSingh-wz3wt
    @SumitSingh-wz3wt 9 місяців тому

    In starting I was appreciating shadcn/ui but I think this library misses a lot of components. As i use this library for building one of my company projects and It took way more efforts than i thought off. It's s not mature yet, misses lot of components i.e , Select with search and clear functionality there is command instead bit it has fix size for selecting i.e, 340px then I have to manually add events for that as per screen size, Year picker are missing in Date picker component . It's quite completed to implement searching, sorting & filters as it's use raw tanstack table and there is lot more which i can't even write. But it's good for building small projects and learning purpose. I won't recommend this library for building organisation project you will run into trouble due to projects requirements. 😊😊

  • @dipteshchoudhuri
    @dipteshchoudhuri 10 місяців тому

    Have you ever yried out Mantine UI? Would be great if you did a video on it.

  • @interceptorghost1149
    @interceptorghost1149 10 місяців тому

    Can we use sonner in Next js 13 app directory app? I faced some errors when trying to using it

  • @rz_7890
    @rz_7890 10 місяців тому

    Hi josh, do you know how to implement page transition in nextjs 13 app router? I've been searching but what I found mostly makes Layout into a client component ("use client").

  • @jayantrohila
    @jayantrohila 10 місяців тому

    Can you create a video tutorial for hoting next.js 13 on aws with every reneder stratigy efficently.

  • @vitvitvitvitvitvitvitvit
    @vitvitvitvitvitvitvitvit 10 місяців тому

    oh, i did'nt about on error stuff of react-query. Holy shit, i always handle the errors in .catch()

  • @toshirohitsugaya1465
    @toshirohitsugaya1465 10 місяців тому

    Gotta give it a try.

  • @tr.j4079
    @tr.j4079 7 місяців тому +1

    It’s kinda buggy unfortunately.

  • @PeriklesPeriklesoglu
    @PeriklesPeriklesoglu 9 місяців тому

    thank you

  • @madebytl
    @madebytl 2 місяці тому

    Can i use them in html code only?

  • @HorizonHuntxr
    @HorizonHuntxr 10 місяців тому

    This is good but unless it supports promise toasts it doesn't make much sense to change from your existing toast library

  • @stevebendersky2056
    @stevebendersky2056 10 місяців тому

    Does useSWR also has this kind of error as you showed for react-query?

  • @leonardocastro1568
    @leonardocastro1568 8 місяців тому

    Is there a similar library for Vue.js?

  • @MirkoVukusic
    @MirkoVukusic 10 місяців тому

    Maybe I'm too old, but toast library is definitely beyond the line I draw for unnecessary dependencies. It's so simple to write one custom for your project. I don't think basic one is more than 20 lines of code.

    • @joshtriedcoding
      @joshtriedcoding  10 місяців тому +1

      It starts getting more complicated once you get to the stacking part and making them all the same height, it does involve a tad more logic

    • @nickwoodward819
      @nickwoodward819 10 місяців тому

      100% with you on this. But it's also given me the idea to publish a fizz-buzz library to make a similar point in interviews, so there's that :)

    • @rand0mtv660
      @rand0mtv660 10 місяців тому +2

      Basic one does basic things. There are some not so edge cases to solve while doing toast notifications and it's definitely not 20 lines of code when you count logic and styling. I'm not saying it's hard to do, but why bother when someone else invested a lot of time doing that already?

    • @MirkoVukusic
      @MirkoVukusic 10 місяців тому

      ​@@rand0mtv660, well, for standard reasons some avoid dependencies inflation. Optimizing code (most use basic features but install library with full features), easier maintenance (library breaking changes or EOL), learning (people dont know how to do basic stuff lately, or even how they work). Jist checked my toast code on the last project... typescript (tsx), tailwind, 4 styles, stacking, transitions... 100 lines of code, mostly tsx

    • @thalesrodriguescardoso
      @thalesrodriguescardoso 3 місяці тому

      Dude react hot toast is crazy light lol it makes NO sense to waste time building what has been built a billion times and tested.

  • @dMDzn
    @dMDzn 10 місяців тому

    Hi, Josh. Is it possible to implement this in a "server side" fasion? If I were to follow similar methods as your TRPC/Quill tutorial and I say have a route in the /api folder that creates a user during which an async request is sent to check if an email address already exists - what way would you send a custom validation message back to the client and display a toast? Would I need to throw a new trpc.TRPCError() or send back a custom error code and catch it on the client?

    • @joshtriedcoding
      @joshtriedcoding  10 місяців тому +1

      tRPC has the same onSuccess and onError callbacks as react query, those really are the ideal place for toasts

    • @dMDzn
      @dMDzn 10 місяців тому

      @@joshtriedcoding I downloaded your project and just discovered this. Many thanks for your help.

  • @preciousegwuenu2938
    @preciousegwuenu2938 10 місяців тому

    wow!

  • @devalberto
    @devalberto 15 днів тому

    Can this be used with Vue js?

  • @rodolpheE
    @rodolpheE 10 місяців тому

    does it work in server components?

  • @mriswan5806
    @mriswan5806 10 місяців тому

    Bro can next u give Reference library chart and lottie files animation for use on library lottie-react

  • @user-ky9ow4wh2y
    @user-ky9ow4wh2y 10 місяців тому

    Aren't onError and onSuccess deprecated?

  • @jellyfish1772
    @jellyfish1772 7 місяців тому

    ok i am using it since shadcn added it

  • @williamgeeks
    @williamgeeks 10 місяців тому

    Whats the name of the sketching tool? 🤔

  • @adedimolao9094
    @adedimolao9094 7 місяців тому

    So easy to use🔥

  • @husseinkizz
    @husseinkizz 10 місяців тому

    Am trying out now now!

  • @iUmerFarooq
    @iUmerFarooq 10 місяців тому

    Is this available for Vue/Nuxt?

  • @user-xc6vr2rn5z
    @user-xc6vr2rn5z 10 місяців тому

    Thanks

  • @luckysolanki9440
    @luckysolanki9440 10 місяців тому

    Can you please make a clone video using Nextjs13.4, mongodb and JS instead of Ts, please, I want to shift from page to app router, but I use these technologies, and I can't find a better teacher ever and anywhere, so please make a clone video, like i want to use infinite scrolling and 'use client' and 'use server', but you use TS in your videos, so please make a clone like youtube or amazon, please

  • @noNullMoments
    @noNullMoments 10 місяців тому

    Meh, ever heard of notiflic

  • @amansagar4948
    @amansagar4948 9 місяців тому

    Does it also work with react native

  • @dfordemo981
    @dfordemo981 10 місяців тому

    cool

  • @vellankiindeevar5530
    @vellankiindeevar5530 10 місяців тому

    bro use alpine js pls

  • @raymondmichael4987
    @raymondmichael4987 10 місяців тому

    Wow 😮;
    Now I need to refactor code 😊

  • @QueeeeenZ
    @QueeeeenZ 10 місяців тому

    I hate those toast notifications, they are so annoying. They're bad UX

  • @naranyala_dev
    @naranyala_dev 10 місяців тому

    tiny lib review, more like this one

  • @eesaaphilips9271
    @eesaaphilips9271 10 місяців тому

    Maybe I'm missing something here, but why are toasts such a big deal?
    For my solidjs/react projects I just write my own; it's a few lines of css and two components. These libraries seem a bit overengineered imo

  • @asimalqasmi7316
    @asimalqasmi7316 10 місяців тому

    First

  • @itspawanpoudel
    @itspawanpoudel 10 місяців тому

    awesome-react-toast is also good

  • @nomadshiba
    @nomadshiba 10 місяців тому

    cool