• ChaoticNeutralCzech@feddit.de
    link
    fedilink
    arrow-up
    0
    ·
    1 year ago

    Opinion from me, a JS beginner: Vanilla is good enough now. If your IDE lets you type common structures like document.getElementById("") with shortcuts, I find no need to use a framework. Also, vanilla works better in offline projects.

    • cactusupyourbutt@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      1 year ago

      so he does all of this because he dislikes transpiling because supposedly it makes debugging etc harder? does he know about sourcemaps?

      he also says he doesnt like type information in his code, so he adda them as comments. the type information is still there, how is this an improvement?

      • scorpionix@feddit.de
        link
        fedilink
        arrow-up
        0
        ·
        1 year ago

        The issue with transpiling is that the code that’s running in production is not necessarily the one that’s been tested. A source map doesn’t fix that.

          • scorpionix@feddit.de
            link
            fedilink
            arrow-up
            0
            ·
            1 year ago

            Because Browsers can’t run Typescript, they run JavaScript. That’s why the intermediate conversion step isneededd.

    • huntrss@feddit.de
      link
      fedilink
      arrow-up
      0
      ·
      1 year ago

      Too be frank, it is pretty short but your summary is on-point. I would only add, that Svelte also dropped it due to the additional compile step.

      However TS can still be used in most of the frameworks including Svelte.

      • alokir@lemmy.world
        link
        fedilink
        arrow-up
        0
        ·
        1 year ago

        I wonder how Svelte’s code is built to make this tradeoff worth it. I’ve been using TS for a long time and in every project the compilation part was the shortest task in the whole build process, especially when you compare it with bundling or running unit tests.