Svelte Action Examples: use:viewport

แชร์
ฝัง
  • เผยแพร่เมื่อ 10 ก.พ. 2025
  • 💻 REPL: svelte.dev/rep...
    📚 Related Resources
    Tutorials svelte.dev/tut...
    IntersectionObserver API developer.mozi...
    🥰 Support me www.buymeacoff...
    🔗 Want to learn more from me? Check out these links:
    Twitter: / lihautan
    Blog: lihautan.com/
    Newsletter: lihautan.com/n...
    #svelte #svelteactions
    Thanks for watching 🥰 -- with love, Li Hau

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

  • @reitznerdomenik
    @reitznerdomenik 4 ปีที่แล้ว +12

    Love the svelteness!
    I would make a function called getIntersectionObserver which would initialize (if it is undefined) and than return it.

  • @SkaArg87
    @SkaArg87 4 ปีที่แล้ว +5

    I love your videos, thanks for sharing your knowledge, you explain very well! Greetings from Argentina

    • @lihautan
      @lihautan  4 ปีที่แล้ว

      You're welcome!

    • @xanderalijah3708
      @xanderalijah3708 3 ปีที่แล้ว

      You all probably dont give a damn but does anyone know of a trick to log back into an instagram account??
      I somehow lost the account password. I love any help you can offer me

    • @mohammedtristen1094
      @mohammedtristen1094 3 ปีที่แล้ว

      @Xander Alijah Instablaster :)

    • @xanderalijah3708
      @xanderalijah3708 3 ปีที่แล้ว

      @Mohammed Tristen thanks for your reply. I found the site thru google and Im trying it out atm.
      Looks like it's gonna take quite some time so I will get back to you later when my account password hopefully is recovered.

    • @xanderalijah3708
      @xanderalijah3708 3 ปีที่แล้ว

      @Mohammed Tristen it worked and I finally got access to my account again. Im so happy:D
      Thanks so much, you saved my ass!

  • @SuperQuwertz
    @SuperQuwertz 2 ปีที่แล้ว

    Thank you so much for sharing this tutorials!

  • @vqt123
    @vqt123 2 ปีที่แล้ว

    great video. I got it working but I do see some errors with typescript. Do you know what needs to be updated to support typescript?

  • @RaviKumar-fx5dz
    @RaviKumar-fx5dz 4 ปีที่แล้ว +2

    you are a good tutor on svelte. Thank you.

    • @lihautan
      @lihautan  4 ปีที่แล้ว

      Thank you! 😎

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

    Learned something new, Thanks

    • @lihautan
      @lihautan  3 ปีที่แล้ว

      Glad to hear it!

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

    This was very informative, thanks for such a simple and easy to understand tutorial!

    • @lihautan
      @lihautan  4 ปีที่แล้ว

      More to come!! 😀

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

    One intersection observer is fine if you only need to share the same root element and threshold parameters I guess.
    Again, thanks for sharing and taking care of potential performance issues as you do. 👍

    • @lihautan
      @lihautan  4 ปีที่แล้ว

      Yea you are right, probably in that case may need to create a new intersectionObserver if it's not possible to share

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

    Great video, keep it up! I like your fast and clear explanations.

    • @lihautan
      @lihautan  3 ปีที่แล้ว

      thank you!

  • @justinoneill2837
    @justinoneill2837 2 ปีที่แล้ว

    Great content! NEVER STOP!!!!!!!

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

    Fantastic. Really Useful 🔥🔥🔥

    • @lihautan
      @lihautan  3 ปีที่แล้ว

      Thank you! 🔥🔥

  • @edward.newgate.capitan
    @edward.newgate.capitan ปีที่แล้ว

    when I use your example in SvelteKit, I get ts error - "Argument of type '{ "on:enterViewport": () => void; "on:exitViewport": () => void; }' is not assignable to parameter of type 'Omit & HTMLAttributes'.
    Object literal may only specify known properties, and '"on:enterViewport"' does not exist in type 'Omit & HTMLAttributes'.ts(2345)" Сan you tell me what is the problem?

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

      i have the same error, did you find a solution

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

    That's awesome, thanks a lot! 😄

  • @OnlyWoody
    @OnlyWoody 3 ปีที่แล้ว

    The first thing that comes in my mind when seeing this API is virtualizing lists of elements, when you'd only render them when near viewport. I have not yet found a working solution like this for Svelte and maybe that would be a nice replacement for svelte-virtual-list which has a lot of drawbacks

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

    Thank you. Again.

    • @lihautan
      @lihautan  4 ปีที่แล้ว

      You're welcome!! 👍

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

    Thank you very much!

    • @lihautan
      @lihautan  4 ปีที่แล้ว

      You're welcome!! 😁

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

    Can you make one video about svelte-dnd-action? I ask so many things sorry.

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

      No worries! I'm adding it to my videos to-make list now

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

      @@lihautan I am waiting for like it soon 👏

  • @AlfredLotsu-m6l
    @AlfredLotsu-m6l ปีที่แล้ว

    Hi Lihau!

  • @ofeenee
    @ofeenee 2 ปีที่แล้ว

    You are being missed.

  • @_nom_
    @_nom_ 2 ปีที่แล้ว

    This framework is the worst. Vue is 100000x better.