Svelte Actions Make Svelte The Best JavaScript Framework

Поділитися
Вставка
  • Опубліковано 8 вер 2024

КОМЕНТАРІ • 71

  • @Methapon2001
    @Methapon2001 11 місяців тому +36

    You know what? This is so powerful. The more I learn the more I love svelte.

  • @O1O1OO1
    @O1O1OO1 8 місяців тому +14

    Did you say "we added brazil" to the `` tag? LOL, that's the first time hearing this reference. Think that is how I'm gonna call it now.

  • @arshiagholami7611
    @arshiagholami7611 8 місяців тому +16

    I've recently switched to Svelte from React and have to say your videos are literal gold. Honestly I love the way you teach that encourages the viewer to explore instead of just memorizing the content

  • @lockitdrop
    @lockitdrop 4 місяці тому +1

    This particular video is almost like a reference book for me, I come back to it every few months to pull out whatever feature I need at the given moment.

  • @nathanm2891
    @nathanm2891 5 місяців тому

    I love this video! I wish I had seen it months ago. I was building a standard map component for customer contact forms which showed the business locations. I decided on leaflet because it was free and easy to use. I built the map component, but then just built an L component where you pass the property name you want to invoke and the options. It allowed me to add attribution tags, markers and other things as components. It was another video of yours that made me think about using let, and the context module to share the map with children. I learn so much watching your videos. Thank you!

  • @null4624
    @null4624 Місяць тому

    After 20 years of bashing JS i think I have no arguments left to ignore TS, it's strong typing is actually nice.

  • @dukeselwood
    @dukeselwood 6 місяців тому +1

    This is an incredible video, absolute gold! Thank you!

  • @nathanm2891
    @nathanm2891 5 місяців тому

    This is my favorite coding channel.

  • @BorisBarroso
    @BorisBarroso 11 місяців тому +2

    This awesome thanks for sucha great tutorial. Thanks for making the Svelte community better! 😎

  • @Nukhtarov
    @Nukhtarov 11 місяців тому +2

    40 minutes, wow.
    I love long videos.

  • @aramp
    @aramp 11 місяців тому

    the part about capturing/bubbling was incredibly useful thanks Matia

  • @anxpara
    @anxpara 11 місяців тому +11

    It's worth noting that (unless something changed recently), Svelte's built-in events can't be bubbled up through slots, which is unfortunate. I just use Eventery for all my events needs these days

    • @irlshrek
      @irlshrek 11 місяців тому +3

      Oh interesting. How come sveltes event dispatcher doesn't do the trick?

    • @anxpara
      @anxpara 11 місяців тому +1

      ​@@irlshreki tried to post a link to the relevant github issue, but youtube hates links, so the comment got removed. i even got a "spam, and scam policy" warning, lol

    • @tombyrer1808
      @tombyrer1808 11 місяців тому

      hmans/eventery on GitHub?

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

      What does this mean in practice? You can't nest svelte actions in the ui?

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

    Great Job, that type error took me a day to solve it, I wish I knew you back then

  • @greggsworld4453
    @greggsworld4453 8 місяців тому +1

    hmm if i look at my server logs form use:enhance is still refetching the whole page but its just not reloading the page. this is worth mentioning. a lot of requests could happen in the background that a developer does not expect to happen. i only noticed this when watching my server logs when submitting the form.

  • @groundbirdaircat
    @groundbirdaircat 11 місяців тому

    I wish I could like this video a thousand times

  • @Allformyequine
    @Allformyequine 11 місяців тому +2

    I love how you are doing a lot of explanations of Svelte Actions! Thank you!

  • @TheRishikesh99
    @TheRishikesh99 11 місяців тому +2

    You can use Parameters utility to just select the 2nd argument type in typescript!

    • @abdellahcodes
      @abdellahcodes 11 місяців тому

      it adds noise, but makes sense when the type is not exported

  • @marlus
    @marlus 6 місяців тому

    Really really nice Svelte tutorials! Thanks

  • @luweilang7340
    @luweilang7340 11 місяців тому +1

    Great job! Thank you for your work

  • @gorbulevsv
    @gorbulevsv 11 місяців тому +1

    Thanks for your hard work!

  • @MrRe-sj2iv
    @MrRe-sj2iv 11 місяців тому +4

    This is kind of a tiny version of component with lifecycle in React but way better and shorter.

  • @callowindia
    @callowindia 11 місяців тому +1

    You are best explainer

  • @levibaraka
    @levibaraka 11 місяців тому +1

    Had me at this video is action packed 😂

  • @yapayzeka
    @yapayzeka 28 днів тому

    this is so cool

  • @jasonrooney1368
    @jasonrooney1368 11 місяців тому +2

    Very similar to vue directives, with the same caveat that they’re not type safe. Angular directives are much more powerful though, as they can be enabled only for certain types of elements (or any css selector) and are fully type safe.

    • @vutruong4164
      @vutruong4164 11 місяців тому

      At this point all these frontend frameworks are just copying each other, putting "new" names on "old" concepts and immediately becoming "so cool".
      This thing called Directive has existed for a long long time in Angular, which everyone loves to hate, but now is trendy again because Svelte does it? Circlejerk Maximus

    • @JoyofCodeDev
      @JoyofCodeDev  11 місяців тому +3

      Angular sucks.

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

      ​@@JoyofCodeDev Skill issues

  • @felipericardi6019
    @felipericardi6019 11 місяців тому +1

    great video, as always!

  • @callowindia
    @callowindia 11 місяців тому +1

    This is amazing

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

    Good Educator!

  • @BboyKeny
    @BboyKeny 6 місяців тому +2

    Brazil mentioned

  • @grinsk3ks
    @grinsk3ks 11 місяців тому +2

    Other Frameworks have this aswell. E.g. in Vue it's called directives, which work in much the same way.
    Unfortunately there is an open pr for proper typescript support.

    • @JoyofCodeDev
      @JoyofCodeDev  11 місяців тому

      The video is less about directives and more about how simple it's working with the actual DOM in Svelte.

  • @__aj2000__
    @__aj2000__ 11 місяців тому

    Thank you for so much efforts :)

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

    I notice that you get the full list of functions in the VS Code tooltip that pops up (looking at around 10:55). My Copilot keeps messing this up. How do I get copilot to f-off and just get VS Code to show me my tool tip for available methods?

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

    Thank You so much for this fantastic video.
    I have question.
    In the first example there is a nice animation when element is added to the DOM, but how to play similar animation when element is removed from the DOM?
    The destroy hook is fired after element is removed from the DOM, but to achieve such animation there would need to something like beforeDestroy hook...

  • @thedelanyo
    @thedelanyo 11 місяців тому +2

    1. Svelte action
    2. Sveltekit form actions
    Action packed 😅😅

  • @abdellahcodes
    @abdellahcodes 11 місяців тому

    Great video 🔥

  • @Voltra_
    @Voltra_ 11 місяців тому

    Literally every framework has a way to achieve this

    • @JoyofCodeDev
      @JoyofCodeDev  11 місяців тому +1

      Show me a JavaScript framework that makes it easy to work with the DOM like Svelte without having to use a ref.

    • @Voltra_
      @Voltra_ 11 місяців тому

      @@JoyofCodeDev Vue's directives are very similar to that Svelte feature

  • @purpinkn
    @purpinkn 18 годин тому

    or just type onchange into the text field?

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

    => Brazil :)

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

    at minute 25, question: Would it be maybe possible to get rid of the innerHtml approach instead of using a Slot Component, where you could inject your content and then do a {#each letters thingy instead? As the template literal approach seems kind of error prone to me...

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

    minute 21: you should Name Types with Capital as first Letter, Bro!

  • @callowindia
    @callowindia 11 місяців тому

    I want more

  • @diegoavendanohernandez9908
    @diegoavendanohernandez9908 9 місяців тому +1

    "here we added Brazil" 😂

  • @ekolteenarp
    @ekolteenarp 11 місяців тому

    It's nice but my personal preference with UI apps is a bit of explicit verbosity than a magical thing that does many things. I actually prefer explicit event handlers still just so I can refresh my memory about what is going on fairly quickly after some time has passed and I haven't been working on Svelte.

  • @schemerboy1005
    @schemerboy1005 6 місяців тому +1

    = Brazil 🤣

  • @fredbcruz
    @fredbcruz 11 місяців тому +1

    funny how in html only brazil can take you to a new line

  • @Nukhtarov
    @Nukhtarov 11 місяців тому +1

    First again! 🍌

  • @illllllmmmm4406
    @illllllmmmm4406 11 місяців тому +1

    typescript

    • @thecoolnewsguy
      @thecoolnewsguy 2 дні тому

      People who hate typescript seriously have skill issues. It improves development experience greatly but oh well people want to waste their time without safety and auto completion

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

    brazil hahaha

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

    Very little explanation is the aim. Lots of argument shadowing and logging of the same values. rather hard to learn much

  • @Eldalion99999
    @Eldalion99999 11 місяців тому +4

    unfurtunately, react cancer destroyed web dev

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

    brazil 🤣

  • @nathanm2891
    @nathanm2891 5 місяців тому

    I love this video! I wish I had seen it months ago. I was building a standard map component for customer contact forms which showed the business locations. I decided on leaflet because it was free and easy to use. I built the map component, but then just built an L component where you pass the property name you want to invoke and the options. It allowed me to add attribution tags, markers and other things as components. It was another video of yours that made me think about using let, and the context module to share the map with children. I learn so much watching your videos. Thank you!