My Top 5 React Libraries for 2023

Sdílet
Vložit
  • čas přidán 28. 06. 2024
  • With 100000000 libraries to choose from, which ones actually improve your code? Which ones really save you time? Here's 5 NPM libraries I've worked with a LOT and I thought it would be irresponsible to not share 'em.
    -- my links
    My GitHub: github.com/joschan21
    Discord: / discord
  • Věda a technologie

Komentáře • 130

  • @gregthomas5887
    @gregthomas5887 Před rokem +141

    1) Zod
    2) Tanstack react-query
    3) Shadcn
    4) react hook forms
    5) cn
    I can attest that these are top-tier libraries.

    • @dankos_8022
      @dankos_8022 Před rokem

      Is zod better then joi?

    • @filipjnc
      @filipjnc Před rokem

      @@dankos_8022 yes

    • @contigen
      @contigen Před rokem

      How about Yup?

    • @nicholascostadev
      @nicholascostadev Před rokem +2

      shad"cdn" haha

    • @randyriver1707
      @randyriver1707 Před rokem

      ​@@nicholascostadev We dont get why you're laughing. You even hit the like button on your own comment. Lol. Sociopath

  • @freeguy2418
    @freeguy2418 Před rokem +33

    0:26 - ZOD
    1:26 - Tanstack React-Query
    2:20 - Shadcn UI
    3:11 - React Hook Forms
    3:56 - Cn

  • @shahariarniloy8935
    @shahariarniloy8935 Před rokem +68

    Can we have a comparison video like zod vs yup, react-query vs swr, react-hook-form vs formik, shadcnui vs any other ui library. ??

    • @spidfair0
      @spidfair0 Před rokem

      I'd love to see a comparison as well. Personally, I've been using AJV, SWR and RHF in almost every project and they've been treating me well. However, I see a lot of buzz for react-query and zod. Not sure if I should be switching some libraries.

    • @rand0mtv660
      @rand0mtv660 Před rokem +1

      Yeah I use yup usually, but would like to understand all this zod hype in the last 6-12 months. I tried to use both just to evaluate personally and it looked to me zod is a bit better with Typescript in general, but yup handled few cases better when it comes to working with forms with react-hook-form. I remember not being able to provide custom error messages in certain cases with zod for certain type errors, but cannot remember what else I had issues with when using zod in that forms case. I just know I stuck with using yup after that, but I'm kinda reconsidering my evaluation because I've seen zod mentioned so much so I'm thinking I missed something :)

    • @joshtriedcoding
      @joshtriedcoding  Před rokem +4

      very good idea

  • @littlehobbyshop
    @littlehobbyshop Před rokem +2

    I just started a new project using all 5 of these! Great list. I would love to see you run through a video using the shadcn components with react-hook-form. They mostly work nicely together but where I've struggled a bit is refactoring the form inputs as re-usable components with Typescript. I've ended up with some crazy type juggling and there must be a better way.

  • @adamjenkins3065
    @adamjenkins3065 Před 11 měsíci

    Thanks for these. Very useful for knowing up to date tech out there for web dev.

  • @jitx2797
    @jitx2797 Před rokem

    Thanks Josh. Last one gonna be very helpful

  • @potatobot2802
    @potatobot2802 Před rokem +4

    Whenever Josh uploads a video I know I will either know something useful or it will enrich the vibe! THANKS FOR THE CONSISTENCY MAN :)

  • @animegeek-011
    @animegeek-011 Před rokem +1

    Mad respect for your choices, I am using them as well.

  • @BaldeepSingh24
    @BaldeepSingh24 Před rokem

    The funny thing is I am using all these libararies currently for my current project and absolutely adore them too.
    From performance to DX, all bases are covered in these

  • @kristian970
    @kristian970 Před rokem

    As always amazing vid ❤️‍🔥

  • @mihaillepadatu8256
    @mihaillepadatu8256 Před rokem

    Love your consistency, keep it up🎉

  • @aristide_F
    @aristide_F Před rokem

    thank you Josh
    I really appreciate your content

  • @Saradomin65
    @Saradomin65 Před rokem +18

    Class Variance Authority (CVA) is also good. Especially if you're working your reusable atomic components from scratch.

    • @user-mz2lm1vb1q
      @user-mz2lm1vb1q Před rokem +1

      totally agree on that, cva has blown my mind
      it looks so declarative and easy to use and it gives so much profit

    • @reubence_
      @reubence_ Před rokem +1

      I might be wrong but ui/shadcn uses CVA under the hood

    • @Saradomin65
      @Saradomin65 Před rokem

      @@reubence_ Yes it does, all the more to use Shadcn and perhaps style them with CVA if you can 😃

    • @anonymoussloth6687
      @anonymoussloth6687 Před rokem +1

      he has a video on them too

    • @HussainFazaal
      @HussainFazaal Před 11 měsíci

      ​@@DiegoDoumecqthey serve slightly different use cases and can be used in combination like how shadcn/ui uses it on their ui components

  • @faraonch
    @faraonch Před rokem

    I 100% agree with your choice and have been using exactly the same for months or even years.

  • @dopetag
    @dopetag Před rokem

    Really helpful! Thanks 😉

  • @rajmuhammedakbarshineam3313

    Yup is a good library for client side validation, also Joi can use in the serverside validation too.

  • @firebird77
    @firebird77 Před rokem

    Thanks, Josh. Love the channel. What would you recommend this year for data visualization in a NextJS application?

    • @joshtriedcoding
      @joshtriedcoding  Před rokem

      I heart lots of good about tremor, might be worth looking into. Havent tried it myself yet tho

  • @aliarslanansari
    @aliarslanansari Před rokem +5

    Josh, your list of libraries is excellent!
    I've had a bad experience with tailwind-merge because it removes text-sm if it is added before text-blue-100. Since one class modifies the font size and the other class modifies the color, tailwind-merge removes one of them based on their order of appearance.

    • @rand0mtv660
      @rand0mtv660 Před rokem

      That shouldn't happen as far as I know. tailwind-merge should only remove/merge "same" classes. Maybe you just ran into a bug or you did something and thought it was tailwind-merge issue.

    • @Rawthul
      @Rawthul Před rokem

      I had the same problem. I didn't test it with default classes, but I was thinking that the reason may be the custom classes that I added to Tailwind's configuration file.

    • @aliarslanansari
      @aliarslanansari Před rokem

      @@rand0mtv660 this was happening with extended font and colors, haven't tried with default classes

    • @rand0mtv660
      @rand0mtv660 Před rokem

      @@aliarslanansari oh for those I think you need to set up additional things for Tailwind merge so that it knows how to merge your custom classes. It cannot just assume things properly out of the box

    • @joshtriedcoding
      @joshtriedcoding  Před rokem

      That's an odd bug, you sure it was because of tw-merge? If so, opening an issue on github might be a good idea

  • @saktipujoedi113
    @saktipujoedi113 Před rokem

    Thanks for the info man.

  • @faizanahmed9304
    @faizanahmed9304 Před rokem +3

    Out of all of them, I appreciate you added Zod at the top. It is by far the best schema validation library in TS.

  • @igo_
    @igo_ Před rokem

    top tier libs! i have used all of them, except for shadcn, but i'll give it a try in my next project.

    • @joshtriedcoding
      @joshtriedcoding  Před rokem

      let me know what you think about it. I found it super useful

  • @sealone777
    @sealone777 Před rokem

    Any recommendations for state management lib? I am eyeing on Jotai but curious what you use. Thanks!

  • @mobix25
    @mobix25 Před rokem +3

    Hey josh. I always love how you simplify hard topics. can you make a video for Next JS and Planetscale? and How to add google adsense to next JS 13.4 ? beginner friendly.

    • @joshtriedcoding
      @joshtriedcoding  Před rokem

      Appreciate it man. I just did a video on Next + Planetscale using Drizzle a few days ago with a starter kit to get set up within seconds: czcams.com/video/8met6WTk0mQ/video.html

    • @mobix25
      @mobix25 Před rokem

      @@joshtriedcoding I've seen that tutorial, it was amazing as always. but if you create a full detailed video by building a real project it would be great.but i know you are busy, so whenever you have free time and want to create a content this could be it. again You are amazing MAN

  • @Dysfunctional704
    @Dysfunctional704 Před rokem +1

    Nice video Josh!
    What about state management libraries? Those aren't talked about so frequently in the Next ecosystem. Would love to see your take on that

  • @bhusanDa
    @bhusanDa Před rokem +1

    Hey josh really appreciate your hard work. Can you prepare a tutorial on any project use all these libraries?
    Love From Nepal ❤ 🇳🇵

  • @plateer42
    @plateer42 Před rokem

    Thanks!

  • @MarcusBrose
    @MarcusBrose Před rokem

    Thanks for your awesome videos

  • @robertocarlosmedina
    @robertocarlosmedina Před rokem

    Another thing you could add on the backend side is Class Validator to re-enforce the validation, alongside Zod or Yup

  • @nilsandresen97
    @nilsandresen97 Před rokem

    I was hoping for shadcn and wasn’t disappointed

  • @anggahermawanAndroidDeveloper

    I've been working on all those Libraries and it's worth it

  • @najlepszyinformatyk1661
    @najlepszyinformatyk1661 Před rokem +1

    my fav react lib is solid

  • @leekaixuan7719
    @leekaixuan7719 Před rokem +1

    Hi, just curious but have u tried rtk-query with redux toolkit? I haven't seen anyone talk about this library and I think it deserves more praise

    • @mma93067
      @mma93067 Před rokem +1

      Using RTKQuery with tags has made my life so much easier. People are just afraid to recommend something “redux” in its name

    • @oscardasilva971
      @oscardasilva971 Před rokem +1

      Nothing beats the combo react-query + zustand

  • @joarkrohnmauseth8863
    @joarkrohnmauseth8863 Před rokem

    Angular out-of-the-box equivalents:
    * useForm -> Angular Forms with ValidatorFns.
    * conditional class names -> ngClass

  • @filipniklas
    @filipniklas Před rokem

    Ohhh, so that's what cn() is doing! I saw shadecn's Taxonomy project using it and I was a bit puzzled what this was doing but the idea is super simple and effective. Great list!

  • @medalikhaled
    @medalikhaled Před rokem

    Thanx for the good content.
    you mentioned you did Freelancing using, React, Nextjs.. and all of these technologies, can you make a video about that: the experience, the market,..etc,

  • @jmula1963
    @jmula1963 Před 11 měsíci

    doesv Tailwind Autocomplete work with the conditional class names hack?

  • @fieryninja2374
    @fieryninja2374 Před 11 měsíci

    In the chapter names Zod is called Zot.

  • @amershboul9107
    @amershboul9107 Před rokem

    the best thing about your channel is that you are uploading videos day after day

  • @twd2
    @twd2 Před rokem

    Awesome!!!

  • @asimalqasmi7316
    @asimalqasmi7316 Před rokem

    How to use react-query with server actions?

  • @saman6199
    @saman6199 Před rokem

    Hi Josh, are we going to get any upcoming Next JS project | tutorial any time soon? BTW, thanks for all your hard work. ❤

  • @ardianhotii
    @ardianhotii Před rokem

    Does zod works with vite react js or only with ts

  • @user-qv1bw8vq1y
    @user-qv1bw8vq1y Před rokem

    thanks

  • @sulavbaral9972
    @sulavbaral9972 Před rokem

    does tanstack query work for server components?

  • @0xahmad542
    @0xahmad542 Před rokem

    as for your number 5th hack, there's already a slick library called `tailwind-variants` which aids in that conditional styling

    • @joshtriedcoding
      @joshtriedcoding  Před rokem +1

      ah nice never heard of that before

    • @leonardojaques6586
      @leonardojaques6586 Před rokem

      is it worth it adding a library for that tho?

    • @0xahmad542
      @0xahmad542 Před rokem +1

      @@leonardojaques6586 for people who are making design systems: yes very much.
      For the more casual devs, not really

  • @totalolage
    @totalolage Před rokem

    I too saw the Reddit thread that inspired this video.

  • @user-qp8lr4ix8b
    @user-qp8lr4ix8b Před rokem

    I have a problem when trying to validate a user password (with a letter, Uppercase, and letter) with Zod using shema. Can someone help me ??

  • @barisballi70
    @barisballi70 Před rokem

    1 - zod
    2 - react-query
    3 - shadcn-ui
    4 - react-hook-form
    5 - clsx, tailwind-merge

  • @SweepAndZone
    @SweepAndZone Před 8 měsíci

    Awesome thanks 🎉

  • @NiklasZiermann
    @NiklasZiermann Před rokem

    The last one is basically the same as the classnames library, in case you dont want to have those 3 extra lines in your project :)

    • @rand0mtv660
      @rand0mtv660 Před rokem

      classnames alone doesn't replace that three line function. That last example also merges Tailwind classes using tailwind-merge so that you can override them from outside of the component. He basically copied this example from shadcn/ui setup guide.
      So instead of adding props on your component for every little thing you might want the user to override, you can just merge classes using this and let user render your component with different padding, color, margin or whatever else by just allowing them to pass class names that they want.
      That last example isn't just about merging class names together, it's about merging class names intelligently when using Tailwind. If you don't use Tailwind then yeah, classnames package will do the job.

    • @hynekss8618
      @hynekss8618 Před rokem

      I would say these libraries solve different, although related, problems. Tailwind-merge was created to deal with the issue of overriding a class already present on an element. When applying multiple contradicting classes to one element (e.g., two text colors), the one that 'wins' is the one defined later in the tailwind stylesheet, which might or might not be what you want.

    • @stinjek
      @stinjek Před rokem

      twMerge has tailwind class application logic for conflicting styles

    • @NiklasZiermann
      @NiklasZiermann Před rokem +1

      You're right, i didn't realize that. Thanks for pointing that out :)

  • @Code_express
    @Code_express Před rokem

    how can i use shadcn ui in reactjs application without using typescript make a separate video sir we are waiting for your response give it is as soon as possible
    Thank you

  • @masterlink6173
    @masterlink6173 Před rokem

    ❤❤❤

  • @brianfarley2723
    @brianfarley2723 Před rokem

    When Josh mentions everything in your current stack..😎

  • @BeyondLegendary
    @BeyondLegendary Před rokem +2

    Impressive, very nice. Let's see Paul Allen's top libraries.

  • @ergusto
    @ergusto Před rokem

    Not the best description of tanstack-query, it doesn’t replace fetch at all. In fact it’s not even a data fetching library. I think the best way to describe it is that it’s a library for managing async state.

  • @Randomguy48279xyz
    @Randomguy48279xyz Před rokem

    👍

  • @MihirAmanRaj
    @MihirAmanRaj Před rokem

    I use formik + yup :)

  • @0xahmad542
    @0xahmad542 Před rokem

    Other than that, a good list for anyone who's out of touch

  • @GabrielMartinez-ez9ue

    Isn't the last function the same as using: function classNames(...classes) {
    return classes.filter(Boolean).join(' ')
    } ?

    • @rand0mtv660
      @rand0mtv660 Před rokem +1

      Nope, not equivalent if you want to have the ability to use objects as arguments for for conditional classes. Your example would only support simpler cases such as using ternary "isLoading ? 'my-class' : false", which isn't necessarily bad. Also, his example is a bit more complex because it's Tailwind specific since it uses tailwind-merge. If you don't require tailwind-merge, just use "classnames" or "clsx" NPM modules since those support strings, objects, arrays etc and are super tiny and fast.

    • @GabrielMartinez-ez9ue
      @GabrielMartinez-ez9ue Před rokem +1

      @@rand0mtv660 thanks for having the time to respond

  • @samuelgunter
    @samuelgunter Před rokem

    i dont know if it's good or bad that i knew all of these already

  • @rimonsade-jd3id
    @rimonsade-jd3id Před 6 měsíci

    😊

  • @nanonkay5669
    @nanonkay5669 Před rokem +3

    Or you could just use Mantine. The newest version of Mantine that's about to come out can be used as a headless UI and will be using css modules instead of emotion. It has react-hook-form built in so the Mantine components have first class integration with it, and can be used with zod. I guess the trade-off is css modules vs utility classes, pick your poison there, but Mantine is truly an all-in-one solution.

    • @Saradomin65
      @Saradomin65 Před rokem

      I read that it's still an ongoing progress to make Mantine work with App dir right? Though the author has added an example of integrating it with app dir, I believe the components have to be wrapped with "use client". Would be good if as much as possible it would be a server side component

    • @nanonkay5669
      @nanonkay5669 Před rokem

      @@Saradomin65 yeah they said their components cannot work in server components completely because they use hooks underneath to get things like the theme to work.

  • @DeberiasTenerUnGato
    @DeberiasTenerUnGato Před rokem

    Ey Josh a greeting can I be your video editor?

  • @JohnMcclaned
    @JohnMcclaned Před rokem +1

    ts-rest 🎉

  • @hn3m3s1s
    @hn3m3s1s Před rokem

    I recommend you take a look at tailwind-variants :)

  • @alice-smith
    @alice-smith Před rokem

    twMerge is a fork of clsx, so I think clsx isn't necessary

  • @Rasty_Boss
    @Rasty_Boss Před rokem

    more video about react-query

  • @futuristic-
    @futuristic- Před rokem

    The react ecosystem is truly huge

  • @mohitchandola3435
    @mohitchandola3435 Před rokem

    are u remote developer ?

  • @imkir4n
    @imkir4n Před rokem

    Josh ♥️

  • @baybay1234
    @baybay1234 Před rokem

    I know shadcn will be one of them before I even start watching the video :)

  • @gabrielbianchi2246
    @gabrielbianchi2246 Před rokem

    Lmao I’m using all of these already

  • @harunalrd
    @harunalrd Před rokem

    first