• andrewbrey@lemmy.world
    link
    fedilink
    arrow-up
    3
    ·
    1 year ago

    I really like how with React (and a few others) you can make a quick abstraction in the same file for a repeated chunk of the render. Sometimes something warrants pulling out into a function for reusability but it doesn’t quite pass the bar to justify its own file as a component - I know there’s some template stuff coming in Svelte 5, so hopefully that scratches the itch.

    • silasOPM
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 year ago

      Totally agree, I can definitely say I’ve found myself wishing for that more as I continue to use Svelte. I didn’t see it as necessary at first, but situations that could benefit from that have come up enough now that I’ve used it for a while

        • silasOPM
          link
          fedilink
          English
          arrow-up
          2
          ·
          9 months ago

          Oh wow, thanks for sharing. Hadn’t heard of that yet, it definitely makes it possible but that syntax will take some getting used to