Major Svelte Kit API Change - Fixing `load`, and tightening up SvelteKit's design before 1.0

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

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

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

    Every time svelte or kit changes and I have to refactor, I wind up with fewer lines of code and more readable code. So I’m okay with this.

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

      Will there be a point where you end up with a negative line count?

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

      @@NabekenProG87 😂😂😂

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

    I’m fairly new to sveltkit and JavaScript frameworks in general but these changes seem good to me. Sometimes people just get stuck in the old way of doing things when sometimes a new way could be better. Svelte is great as a newer dev because it truly does feel like it wants to make things simpler

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

    I absolutely love these changes. I am so stoked and eager for the update. I think once you get used to the plus sign and the other changes this will feel so natural.

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

    I quickly found myself always using a folder for every page for consistency and organisation, but I always felt a little guilty that i was over structuring. I thought that javascript influencers would look down at me and tell me that i should use the minimum amount of structuring that gets the job done. Now i can carry on with what i was doing guilt-free

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

    Great video. You explained the reasoning and the benefits of these changes really well. I hope other projects in the future look back on this decision when designing their APIs.

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

    the new changes will be available next week, my trust go with Rich, we need sveltekit to be top of the frameworks

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

    As soon as I get very comfortable with sveltekit, they want to make some changes haha Im excited!

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

    I spent many weekends updating my site from Sapper to Sveltkit, and just when I got to the finish line this major update was released, so now I have to throw out all the work and start from scratch. I thought about just re-writing the site using Astro.. but your videos have helped me get some clarity around the new changes so I may stick with Svelte. Thank you for all the work you do to put out these tutorials Scott.. its appreciated.

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

    I love it! 😎

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

    New to Svelt/+Kit and wanted to start soon-ish.. How do I make sure I don't learn old stuff? What are good sources? Does it make sense to wait a few weeks?

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

      If you are learning for the first time I would wait entirely for a week or so. I’ll post about video about how to spot old SK content

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

    I'm in the early state of my project. I was quite confortable with the last changes except this major break. Anyway, I'll follow your advice, and I'll refacto all of my project to fit these updates.

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

    Great job Scott! You get my vote for being convinced!

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

    As someone fairly new to Svelte and SvelteKit, I can kind of see both sides of the debate, but personally, I'm OK with these changes. It seems a little more verbose but a lot more explicit. If it was a lot more verbose to get a little more explicit, I'd dislike it, but at the current balance, it's a good thing.
    I get that this means that we have knowledge that no longer applies. I get that this means that there's a lot of tutorial material that no longer applies. But in my opinion, SvelteKit itself is better. I'm glad that I put off starting a major project using SvelteKit until we got closer to 1.0, but even in my case, it was close, I'd probably be just starting a major project now if I hadn't heard that this was coming.

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

    Thanks for making this post more clear. This looks pretty good in my opinion!

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

    Going to be a big refactor for work, but I like how it keeps things more consistant.
    Keen to work on my side project and put this change in

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

    You were the first person I thought of when I saw the initial tweet from Rich

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

    love them! i feel makes it simpler to understand and manage

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

    Hey Scott! How do you get your typescript errors to shop up inline in your project?

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

      I think he use an extension named "Error Lens"

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

      @@hugosansane4805 Thanks so much!

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

    Sounds cool, thanks for sharing!

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

    10:45 "index" is more of a "route name" and "page" is more of a "component name". With the philosophy in the new direction, "page" makes more sense.

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

    This +page is simply another name with the same problem, instead of a lot of index.svelte files you will get a lot of +pages.svelte files, one better option would be the same name as the folder, so about/index.svelte would be about/+about.svelte, this will make every index.svelte route to have the same name as the folder and the only index.svelte file will be the starter page

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

    Unfortuantely, one of my larger customers decided to ditch Svelte over the +page.svelte issue, as it makes development too cumbersome within their companywide IDE.
    I don't get, why people just assume, that everyone and their grandma uses VSCode ... this is simply not the case.

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

      That’s a wild decision to drop a whole platform for such a positive change.

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

      ​ @LevelUpTuts As the system was currently under evaluation, the "drop" hasn't had such a great impact. I misused the word "IDE" here. A group of writers were maintaining MDX files on a foler-permission basis. For that, they were using Typora and/or Quiver (Markdown Editors) as well as the native OS filesystem for handing the files. Now let's guess how "search", "recently edited" and OS features like these work with a lot of "+page.svelte" files ... ... ... exactly 🙄

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

    I had headaches trying to figure why routes/about.svelte is not working for me. Your video saved me. You gained a new sub😊

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

    All of these changes look great.

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

    Will these be implemented soon or is it like idea chosen and come out in months

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

    Think you missed one critical part about post requests, you can't return data directly with post request. You can send a location but not the data directly but why?

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

      Post requests and “Actions” are still being reworked so I didn’t want to focus on how it is currently as it’s likely to change.

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

    As someone that has to rework and relearn a bunch of stuff, (the SSR-Magic that svelte does is not that settled yet for me), I do quite like the changes they are implementing. No index.svelte in subfolders and having to trible-guess what a file should be named now is great. Less housekeeping, managing and conjuring up a guideline, more going to town on work.

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

    this such a really good video if you know whats going on 👌... TH-cam needs more videos like this

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

    if one relies on third party components I suppose there is a period where some will have been modified and some have not? as it will break any of them that exist now?

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

    overall, I think the SvelteKit changes just to make it more proper, clear and future proof framework. I like the changes even they write long explanation, means they are aware and care about this.

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

    @LevelUpTut
    Will you make a full blown SvelteKit 1.0 tutorial when it's released?

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

    My complaint is the timing. If we are really that close to 1.0, then this group of changes should have been introduced months ago. Not this close to the release of 1.0. Or, maybe 1.0 is not going to released this year.

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

    I liked how next does you can do index.page.jsx you specify as page and you can configure in settings

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

    What icon pack are you using?

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

    ya hay fecha para la v 1.0?

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

    I'm mostly concerned with how this will impact MDsveX. It seems that processing markdown files in routes should be native to SK, and allow for components in the markdown body and load those components in the Markdown body automatically without imports of those components below the markdown file front matter.

  • @SRG-Learn-Code
    @SRG-Learn-Code 2 ปีที่แล้ว

    Which video has Rich Harris made?

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

    Ahhh, I am excited but oh boy there will be a lot of refactoring. I hope my new error handling logic works in this

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

    awesome 😍

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

    thanks

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

    I dont get the folders

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

    yeah. I need to do some migrations but seems like my codes look better.

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

    I see lots of the changes are related to how the load function works, so I am not sure how many of the routing "rules" are required for those improvements. However, I personally find most of these changes quite arbitrary like use "+" vs using "@". I would have personally liked the @ while I find the + to be an eye sore. My point is not that we should use one over the other, but that when choices of this type are made based on some arbitrary idea of what is "simple" or how much space on the screen is too much then we might be having a problem.
    Also I actually used the ambivalence between "myroute.svelte" and "myroute/index.svelte" to manage how layouts affect the code in those folders in a few case.

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

    my app is in absolute shambles

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

    I'm one breaking code update away from never using svelte again , from the sapper debacle to the +page routing bizarre syntax my patience is getting tested

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

      version 1.0 is not even released. Now it's time to make breaking changes in my opinion

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

      @@Slada1 yeah but I liked the first version of the routing now it changed 2 times like for the worst it got so much confusing

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

    Thousands of +page file is still not beautiful no matter what you do

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

      It’s not that different than the thousands of index.svelte files I had before, only now I can easily narrow the search by adding a +