Svelte 5 Runes Demystified (3/4) - Why You Should Never Use $effects When You Can Use $deriveds!

แชร์
ฝัง
  • เผยแพร่เมื่อ 29 ธ.ค. 2024

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

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

    Hey looking forward to video 5!

  • @vfrunza
    @vfrunza 7 หลายเดือนก่อน +9

    I just finished watching this and the previous 2 videos. I’ve been looking for content like this since svelte 3. You’ve done a great job explaining how svelte actually works, and I’ve already identified things I’ve done in the past to give me terrible runtime bugs.
    I hope you continue to make videos like this, you’re very good at it!

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

      This is exactly what I want to hear! I'm happy this was useful for you... Thank you for your comment and feedback :)

  • @null4624
    @null4624 4 หลายเดือนก่อน +2

    Best content. Thanks a buch for sharing and all your work!

  • @jerboas86
    @jerboas86 7 หลายเดือนก่อน +4

    That would be so cool to be able to access this dependencies graph in an inspector.
    Btw, great content 👏

  • @johnathanmeerfeld4677
    @johnathanmeerfeld4677 6 หลายเดือนก่อน +2

    This is really great, hope to see more from you.

  • @NoOne-jg3jx
    @NoOne-jg3jx 7 หลายเดือนก่อน +8

    need more content from Peter related to Sveltee.......

  • @galen-winsor
    @galen-winsor 7 หลายเดือนก่อน +2

    This is awesome! Are you planning a video going through the source code for nano? That would be really amazing. I hope you start making more videos like this.

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

      Thank you! I had a bit of a back-and-forth with that idea. I mean the point of nano is just to get people's head wrapped around signals & svelte 5, hence why it loosely replicates the compiled code of svelte 5. But it's probably going to evolve as I implement new features, so probably shortly after I make a video it will be outdated anyway. I'm still on the fence!
      I tried to put as much thorough documentation and explainers in the nano source code though.

    • @galen-winsor
      @galen-winsor 6 หลายเดือนก่อน

      @@petermakeswebsites That makes sense. I think what I'd love to personally see is how you implement signals in general, so it's not so much understanding the Nano code itself but the general approach. Like, what are the key parts that every implementation has vs. the parts that are specific to Nano. For instance, I'm curious if the DepTracker pattern you use with static instance variables is a common pattern.

  • @bmehder
    @bmehder 6 หลายเดือนก่อน +5

    I'm kinda of addicted to your videos now. I hope you have the time to make more. So much to learn with Svelte 5 coming out soon.
    Is there a part 4 of 4, or is this an "off by one error"? :-)

    • @petermakeswebsites
      @petermakeswebsites  6 หลายเดือนก่อน +1

      Thank you! I appreciate the feedback. It's not an error - I have plans for a part 4 and even a cheeky 3.5 potentially. It's just been busy around here. Can't make any promises as for when but it's definitely on my agenda :)

  • @armantgold
    @armantgold 6 หลายเดือนก่อน +1

    REALLY enjoyed this explanation and got some really good info from these vids. Thanks!

  • @cntrvsy
    @cntrvsy 7 หลายเดือนก่อน +1

    Amazing video, more in-depth content like this is crucial in my opinion if people really want to be fully expressive with their favorite framework. really looking forward to the effect.pre effect.active and effect root breakdown as i have been wanting to step up my animations game powered by javascript. using motion one in svelte 4 sticking everything in an onmount call worked but i couldnt say i had the best confidence on how exactly it worked and how i could ensure my animations remained in sync( sometimes they did sometimes they didnt lol).

  •  7 หลายเดือนก่อน +1

    Great content! Thanks!

  • @BhideSvelte
    @BhideSvelte 7 หลายเดือนก่อน +2

    audio is low :
    on other videos we get Stable Volume from TH-cam but stable volume was off for this video

    • @petermakeswebsites
      @petermakeswebsites  7 หลายเดือนก่อน +2

      Arg! I'm trying to find a setting for stable volume but can't find it anywhere :(

  • @TheRealJuggaloJoel
    @TheRealJuggaloJoel 5 หลายเดือนก่อน +2

    these videos are great!
    Did you troll us and there is no fourth video? Or did it get taken down?

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

      Thanks! I've had an outline for the fourth video but I've been so busy these last few months I haven't really had the chance to make it. It's definitely on my bucket list!

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

    Do you have the slides for this?

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

      I do actually. I will link them once I've completed the series because they may change a little bit. I know it's been a while! It's still on my mind to do two more parts.

  • @pipchenko
    @pipchenko 6 หลายเดือนก่อน +1

    For me it looks like effect should be used to run some side effect code i.e. some api post or logging

    • @petermakeswebsites
      @petermakeswebsites  6 หลายเดือนก่อน +1

      That's the idea. People may be tempted to use $effect as a way to continue some logical process (when this changes, then do that), but that logical process can more often than not be solved using $deriveds, or even just plain old functions of the original $states.

  • @KevBurnsJr
    @KevBurnsJr 7 หลายเดือนก่อน +1

    Audio levels are low on this video compared to the others.

    • @petermakeswebsites
      @petermakeswebsites  7 หลายเดือนก่อน +1

      Hm thanks for pointing that out, I think I edited this video with different software. Good to know for the future...

    • @W4nn3
      @W4nn3 7 หลายเดือนก่อน +2

      IMO they are all a bit low

    • @petermakeswebsites
      @petermakeswebsites  7 หลายเดือนก่อน +1

      @@W4nn3 I'll check the levels for all of them next time

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

    You know your stuff and this helped me greatly but you could work on your presentation. This whole series could have been way shorter and more concise. Maybe don‘t talk about edge cases the moment they come up while explaining something more general but do it afterwards. Maybe cut confusing missspeaks that take the viewer out of the flow of your explanation. More but shorter and cleaner takes would really keep the viewers attention instead of one long and messy one.
    One last thing would be that you often talked about the fact that you are gonna talk about something instead of just actually talking about it which was frustrating.
    I suffer from most of those problems myself when trying to explain something complex to others which is why they struck a nerve

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

      Thanks for your feedback. Yes my editing and flow can be improved you're right about that! I think I don't like to explain an advanced concept earlier than appropriate because certain ideas require other foundational ideas to make sense. But I'll definitely take what you're saying into consideration.