i didn't know these Svelte tips

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

КОМЕНТАРІ • 30

  • @alexanderleschanz9991
    @alexanderleschanz9991 3 місяці тому +5

    The output of the twMerge() function is always the same string, so it's VERY inefficient to run it, every time time the page reloads.

  • @Danielo515
    @Danielo515 Місяць тому +2

    Post to API logout to delete a todo ? What wn interesting naming convention

  • @nathnaelgetachew7379
    @nathnaelgetachew7379 Місяць тому +1

    Just learnt alot from this.👌
    If you'd just increase the font size and zoom a bit

    • @nevillebrem
      @nevillebrem  Місяць тому +1

      Yo, will do that. Thanks for the advice

  • @JonathanYankovich
    @JonathanYankovich 2 місяці тому +2

    On your way to 1,000 subs! Have another!

  • @TheSysmat
    @TheSysmat 4 місяці тому +3

    Http delete not post

  • @RafaelSouza-l6i
    @RafaelSouza-l6i 3 місяці тому +1

    There is a way to enhance images with url coming from API response? or only local images? Nice video btw

    • @nevillebrem
      @nevillebrem  3 місяці тому +1

      thanks for the feedback! i am not sure, sorry...

  • @TheOnlyJura
    @TheOnlyJura 5 місяців тому +1

    Very good video. You should have however targeted svelte 5 probably (or provide both).

    • @nevillebrem
      @nevillebrem  5 місяців тому +1

      i also thought about that. i will make a dedicated svelte 5 video soon though

  • @imagineabout4153
    @imagineabout4153 3 місяці тому +1

    Very nice brother, just as a tip, increase the font size and browser zoom

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

      i'll do! thanks for the feedback

    • @midewestmond9442
      @midewestmond9442 2 місяці тому

      Very important most of us are watching from phone

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

    About the first one: it wont work if js is disabled in browser

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

      a pitty but makes sense ig

  • @ocin3752
    @ocin3752 5 місяців тому +1

    Very useful. Can you do a video on shallow routing?

  • @AmxCsifier
    @AmxCsifier 2 місяці тому +1

    It's better to named form actions with the enhance helper instead of using fetch. Form actions can have any name and you can have any number of actions. Or better yet, use superforms if the app is quite complex. I wrote a large app without using fetch at all.

    • @AmxCsifier
      @AmxCsifier 2 місяці тому

      You don't need to turn every button into a form. You can use only one form with id=myform for example. Then set form=myform and formaction=?/delete for example on the button. Thus you can have one form and any number of form buttons.

    • @nevillebrem
      @nevillebrem  2 місяці тому

      i know about that... not a bad idea but i am used to doing it with fetch. i am also a big fan of superforms. but somehow the action of creating a form for every button didn't really click to me. but thanks!

    • @AmxCsifier
      @AmxCsifier 2 місяці тому

      @@nevillebrem "the action of creating a form for every button" You don't need to do that.

    • @nevillebrem
      @nevillebrem  2 місяці тому

      how would i pass down data with superforms?

    • @AmxCsifier
      @AmxCsifier 2 місяці тому

      @@nevillebrem Same principle. By using formaction. Although, I prefer to use dataType: json because my forms are quite complex. If you'd like, create svelte lab repl and if you get stuck, I can help you.