Tailwind is messy. Make reusable components instead with ReactJS, TailwindCSS, & TypeScript

แชร์
ฝัง

ความคิดเห็น • 43

  • @dev-suresh
    @dev-suresh 8 หลายเดือนก่อน

    Huge thanks to you Man. Not all TH-cam channels are teaching what actually are REUSABLE components. Thanks Man

  • @mohans3104
    @mohans3104 4 หลายเดือนก่อน +1

    This is just awesome! in just one video you covered a lot of topics (twMerge,CVA,clsx). Thanks a lot for this video. I will watch this multiple times so that everything you showed gets ingrained. Thanks again.

  • @AndriusLau
    @AndriusLau 8 หลายเดือนก่อน +3

    You just reinvented Shadcn :) Great tutorial.

  • @JacquesOP
    @JacquesOP 10 หลายเดือนก่อน

    I just start learning React and Next Js and I was wondering how I could make a very reusable button component so that I couldn't re-style it if I needed a different button style.
    And man THIS IS HUGE for me 😁
    Thank you for the time you spent to share all of this to us

  • @apex-lazer
    @apex-lazer 5 หลายเดือนก่อน +1

    Yah bruh this is dope and literally super smart and the only way to go… also you’re super easy to listen to and I’m stoked to now officially be a subscriber… also why I’m I sitting in the couch writing this in my phone when I could be on the Mac Studio coding rn 😂!

  • @HarshDoes
    @HarshDoes 6 หลายเดือนก่อน

    I was looking for something like this too clean up my messy code. Thank you so much for this. Well explained. You are all amazing teacher 😁❤️

  • @Altarva
    @Altarva 4 หลายเดือนก่อน

    enjoyed watching and coding this one out. Really appreciated ♥

  • @mmalama
    @mmalama ปีที่แล้ว

    best explanation on the entire yt related to this topic

  • @kim92se64
    @kim92se64 ปีที่แล้ว +1

    Real tutorial for professionals

  • @ndifrekeumoren3548
    @ndifrekeumoren3548 4 หลายเดือนก่อน

    Love the simplicity

  • @alkadoHs
    @alkadoHs ปีที่แล้ว

    This is very cool, something i was looking for.
    Thanks man

  • @Hatim-s1t
    @Hatim-s1t ปีที่แล้ว

    it's like making your shadcn library, thanks 🙏

  • @rawnaqul
    @rawnaqul 6 หลายเดือนก่อน

    Super helpful video! thanks a ton man!!

  • @JayanthiR-ry1eg
    @JayanthiR-ry1eg ปีที่แล้ว

    Thank you for the explanation. It was clean and neat.❤

  • @Pareshbpatel
    @Pareshbpatel 6 หลายเดือนก่อน

    Creating Re-Usable Tailwind Components, so clearly explained. Thank you very much.
    {2024-05-27} - Subscribed!

  • @throwaway-lo4zw
    @throwaway-lo4zw 11 หลายเดือนก่อน

    great vid thanks, very easy to follow

  • @chinmaykunkikar
    @chinmaykunkikar ปีที่แล้ว

    Loved the explanation! Thanks ❤

  • @bestvocabulary8362
    @bestvocabulary8362 ปีที่แล้ว

    And I would like to add on that in tailwind overriding don't happen so that red color to the background which you are able to see now after putting the props after the className may or maynot show up the same color when after to re run your project

  • @user-zv6bv7eu8k
    @user-zv6bv7eu8k ปีที่แล้ว

    This is unreal thank you so much

  • @AleksDuni
    @AleksDuni 3 หลายเดือนก่อน

    How would I go about using an MUI button as the base for the component?

  • @dylankuzmick3122
    @dylankuzmick3122 11 หลายเดือนก่อน

    This is really well explained and extremely practical!
    I wonder if it's possible to do something similar applied to different jsx tags of the children. Setting aside variants, if I wanted to type both and a as children elements of a Card component in App.tsx, how would I be able to style both of those tags in a component and apply it to the children? It doesn't seem straightforward since I'm actually creating new and in App.tsx.
    I suppose I could create an h1 and p prop in my component with the styles applied, and destructure that prop in my page, but that doesn't seem like a very elegant solution since I'm writing an entire paragraph for an object property. If anyone has a better idea I'd love to hear it.

  • @julienheng3880
    @julienheng3880 5 หลายเดือนก่อน

    Can you achieve this without using typescript?

  • @ronamar20
    @ronamar20 10 หลายเดือนก่อน

    Great video thank you very much, just one question. im trying to implement this approach with nextJS (following your course) i did all the layouts and pages in folder structures as you said, but i am running a problem when trying to pass a function through the onClick prop. i think next is limiting it but i am not sure, how do i make things click? thanks :D

    • @bloodylupin
      @bloodylupin 10 หลายเดือนก่อน

      hello, are you marking your buttons with "use client" directive? In Next.js components run on server by default, to make a component run on client you have to add
      "use client"
      at the start of the component file.

    • @ronamar20
      @ronamar20 10 หลายเดือนก่อน

      hi @@bloodylupin,
      actually i did try it out but it didnt work, it felt like it did nothing really, like next.js straight up ignored it.
      thanks for the reply :)

    • @bloodylupin
      @bloodylupin 10 หลายเดือนก่อน

      @@ronamar20 hi can you send me a git repo where I can see the code? you can paste it here

  • @Lunolux
    @Lunolux 8 หลายเดือนก่อน

    nice!
    thx

  • @mase-ob1vf
    @mase-ob1vf 9 หลายเดือนก่อน

    KING

  • @user-zv6bv7eu8k
    @user-zv6bv7eu8k ปีที่แล้ว +2

    Bootun

  • @prashlovessamosa
    @prashlovessamosa ปีที่แล้ว

    Can you please make some lectures on NextJS your NextJS video was super helpful.

    • @Devistry
      @Devistry  ปีที่แล้ว

      what specifics about nextjs would you want?

    • @alkadoHs
      @alkadoHs ปีที่แล้ว

      ​@@Devistry many TH-camrs makes nextjs course using server actions and route components but they don't show how to use nextjs as the client framework.
      Server components makes it harder to use nextjs as a client framework.
      Let's say I have API made in Django and i want to use it with Nextjs, normally we used to store JWT tokens on the local storage and reuse it to authenticate the user on different routes also obtaining some information from local storage for example user position for authorization. But what's confusing i can't access local storage on server components, and many TH-camrs they don't give this soln instead they are focusing on server actions which is ugly .
      Please solve this brother i will be thankful 🙏

    • @Devistry
      @Devistry  ปีที่แล้ว +1

      You don't have to use NextJS as a Client Framework in order to consume an API such as your Django API. You can also use async server components and fetch from there. The choice whether to use client or server components should not be determined by the way you want to fetch from an API. Instead you choose client or server component if you want to access browser features (such as LocalStorage) and do client side rendering, or if you want to do server side rendering. Both have pros and cons, and you pick the right one for each component. Both can fetch data from an API. Also: don't use LocalStorage to store JWT authentication tokens. Use HTTP Only Cookies instead. LocalStorage has no protection against XSS attacks.@@alkadoHs

    • @alkadoHs
      @alkadoHs ปีที่แล้ว

      @@Devistry okay get you! But how if i use react vite,react-router-dom, react-qury and other libraries like thustand. Is there any differences compared to nextjs?
      I mean performance differences

    • @Devistry
      @Devistry  ปีที่แล้ว +1

      The nextJS does optimize many parts of your app so there might be a performance increase. But the main benefits are with SEO due to server rendering.@@alkadoHs

  • @Samuel-vk6kl
    @Samuel-vk6kl ปีที่แล้ว

    what a tutorial!

  • @mmalama
    @mmalama ปีที่แล้ว

    thanks man

  • @johnacsyen
    @johnacsyen 7 หลายเดือนก่อน

    @7:46, cat!!!

  • @bestvocabulary8362
    @bestvocabulary8362 ปีที่แล้ว

    Good man 👍

  • @VenusVanessa06
    @VenusVanessa06 9 หลายเดือนก่อน +2

    Hi there, I'm just here to offer some constructive feedback. This video starts in the middle of no where. I would suggest maybe that next time you give some context as to what you are doing and how you will be doing it, that would be much more helpful. Thanks

  • @kshitijkumarsaini9501
    @kshitijkumarsaini9501 9 หลายเดือนก่อน

    Example from shadcn lib