Highlight any panel in your dashboard

แชร์
ฝัง
  • เผยแพร่เมื่อ 22 ก.ย. 2024

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

  • @mryechkin
    @mryechkin ปีที่แล้ว +2

    Super neat! Love that data attribute pattern. I can see it being very flexible for component libraries.

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

    I was literally stalking your channel for new videos and you dropped this haha

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

    Thanks Sam!

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

    your content is always so effective and really useful. thanks

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

    nice job dude! tks a lot! I will definetly look for use more data atributes!!

  • @pheisar
    @pheisar ปีที่แล้ว +14

    Anyone feels RSCs is kinda leaky abstraction? This isnt any strong opinion or statement, but i have this feeling that with RSCs we spend a lot of time thinking about how to organize code due to the server and client boundaries instead of the domain we are tackling. I cant quite articulate why but it makes me feel uncomfortable. Thanks for video though, appreciate it as usual.

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

      I feel you get that with practice, or just mark all as server component and forget about it

  • @BritainRitten
    @BritainRitten ปีที่แล้ว +9

    That's neat, but then there's (apparently?) no intellisense or type safety between the `highlight` in the caller vs the Highlight component. If I change `highlight` to `highlighted` on one side vs the other, nothing will alert me of an issue.
    Btw, I love your videos, they are well explained. I think the extraction of that very general single-focused wrapping component is very clean otherwise.

    • @samselikoff
      @samselikoff  ปีที่แล้ว +3

      Great point! I like the simplicity of data attributes (flexible in many environments) but if you wanted to lock it down I guess you could expose some props instead:
      - highlightEnterClassName
      - highlightLeaveClassName
      then wire those up inside the component 👍

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

      I was wondering the same... Thanks for giving some insight into a type safe approach Sam and awesome video!

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

    The goat. Learned a lot of useful stuff

  • @aymenbachiri-yh2hd
    @aymenbachiri-yh2hd หลายเดือนก่อน

    Thank you so much

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

    Awesome job. As always

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

    Simply awesome!

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

    this is superb

  • @Smartercow
    @Smartercow ปีที่แล้ว +2

    Why you use let instead of const?

  • @oscarljimenez5717
    @oscarljimenez5717 ปีที่แล้ว +3

    Nice video, but those 'let' instead of 'const' is killing me!

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

    Great video and design as always, Sam, inspire me with your lessons. Tell me, what app do you use to record video and screen?

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

    amazing. thanks Sam.

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

    great as always 🔥

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

    Loved the video sir. Your videos helped me a lot to learn framer motion. Will you please create a framer-motion video taking Imperative coding approach using useAnimate hook

  • @swarajsaxena00
    @swarajsaxena00 ปีที่แล้ว +2

    loved the video, how does your naming always get converted to camel case automatically??

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

      If I understand the question correctly, if you rename the variable using F2 or right click -> rename, all the instances within the scope automatically get the correctly renamed.

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

      @@serveshchaturvedi2034 Yep F2 to rename, or for useState I use this snippet: gist.github.com/samselikoff/846f48370086fc502a66a7df7dd0a7cb

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

    Masterful video as always. I’m trying to wrap my head around the refactor to being server component-compliant and what benefits that produces. Am I correct in assuming that the refactor will allow it to initially render in the DOM on load versus needing JS to load and hydrate the component if it remained a client component?

    • @samselikoff
      @samselikoff  ปีที่แล้ว +2

      Nope - Client Components are pre-rendered so you'd still have HTML for the initial response. The benefit is being able to use Highlight within a Server Component. Highlight itself is still client, so still ships React and hydrates. But the page is RSC, so it can do things only RSC can do, like read data from a database.
      Being able to use Highlight as a component rather than a hook means you could highlight parts of an RSC if a prop changed, for example dynamic data from a database, or data from a cookie (as in the Build UI demo). RSC is not about reducing JS or initially rendering HTML. It's about letting you write React components that do things we previously needed framework-specific APIs for, like getServerSideProps from Next.js or loader() from Remix. That's the benefit of RSC, and so the benefit of giving Highlight an interface that's easy to use from either a SC or a CC is that it's the kind of thing you'd likely want to use in both places.

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

      @@samselikoff Ahh. Really great explanation. Appreciate the great work 👍

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

      @@kevinpruettyou got it!

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

    How did you create multiple cursors in each of the occurances of the word "visitors" (but exclude some of them) at 2:36? Blew my mind! (Looks like youre using vim, i also use vim but didnt know about that!)

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

    Just curious about which extensions you use in your VS Code, Please mention it 🔥

  • @BolatBolat-z4h
    @BolatBolat-z4h ปีที่แล้ว

    why did you set value type to unknown?

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

    Object styles with something like chakra is better than tailwind because tailwind feels like a whole new language to learn and looks like a wall of text rather just an extension of js like react is

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

    so basically we could handle dark/light mode with that approach? It would be a lote harderd to maintain tho