How Svelte differs from React or Vue

Поделиться
HTML-код
  • Опубликовано: 20 окт 2024
  • 🎥 For more tech documentaries and weekly dev stories, subscribe to be notified 👉
    During the production of Svelte Origins, we asked Rich Harris, Scott Tolinski, Swyx, and Amelia Wattenberger what makes Svelte different from other popular JavaScript frameworks like React and Vue.
    00:05 What makes Svelte different?
    03:11 How does it differ from React and Vue?
    05:08 Svelte isn't going anywhere
    07:50 What makes Svelte so loved?
    #Svelte #JavaScript #SvelteOrigins #PR #SvelteNews #Programming #SoftwareDevelopment #Developer #OpenSource #Technology #RichHarris
    OfferZen is a developer job platform helping devs find jobs they love in positions they deserve. Want to know more about OfferZen? Check out the link below. 👇
    www.offerzen.c...
    Connect with OfferZen:
    Article: www.offerzen.c...
    Twitter: / offerzen
    Instagram: / offerzen
    Facebook: / offerzen
    LinkedIn: / offerzen

Комментарии • 20

  • @wertin200
    @wertin200 Год назад +7

    2:04 It would be interesting, to explain for newer web devs why the virtual dom at one point of time was faster and why it is now most likely slower.

    • @alexandrecosta2567
      @alexandrecosta2567 Год назад +1

      It was the "right" way for the longest time, because you had a separate graph of changes made to the structure. This graph could be compared with the existing DOM, and this meant that only the thing that changed was updated. This is exponentially better than refreshing the whole page, and it's similar to AJAX updates but "faster" because it doesn't travel back to the server for information.
      Despite all this good stuff, React still traverses the whole virtual DOM for every single update (even if it's just to increment a count), and all this work is made client-side. You can imagine this is not very efficient. Svelte fixes this problem, among others.

  • @dunkTheFunk
    @dunkTheFunk Год назад +9

    sveltekit and svelte are quite simply incredible. Rich should be given a knighthood

  •  Год назад +7

    Very great overview, Svelte/SvelteKit makes web development more easy and more productive, since you write less code, you get less bugs, and less thing to worry about

  • @djpunisha29
    @djpunisha29 Год назад +1

    stupid question, does build time happen in the world of the web and websites?
    I thought that you have to ship the code to the client and his browser interprets the JS, how is svelte different, where is this compiler placed, on the server, when you ask the server, then the svelte compiler compiles svelte code into JS. Where is the build step actually happening?

    • @OfferZenOrigins
      @OfferZenOrigins  Год назад +18

      That's not a stupid question at all! In fact, it's an important question that many people may have.
      When it comes to web development, there are different ways to approach building and shipping code. In general, there are two main approaches: server-side rendering (SSR) and client-side rendering (CSR).
      With SSR, the server generates the HTML content for the web page and sends it to the client's browser. This means that the build process, which involves compiling and bundling the code, happens on the server. The server-side code can be written in a variety of languages such as Node.js, PHP, or Python.
      With CSR, the code is shipped to the client's browser and the client's browser is responsible for rendering the page. In this case, the build process happens on the developer's computer before the code is shipped to the client's browser. This is the more common approach for web development with JavaScript frameworks like React, Vue.js, and Angular.
      Svelte is different in that it uses a hybrid approach. Svelte is a compiler that generates highly efficient and optimized vanilla JavaScript code that can be shipped to the client's browser. However, Svelte also has an option for SSR, which means that the build process can happen on the server as well. When using SSR with Svelte, the Svelte compiler is run on the server and the resulting HTML content is sent to the client's browser.
      Does that answer your question?

  • @maskman4821
    @maskman4821 Год назад +5

    Sveltekit is without doubts the No.1 meta-framework and I build everything with Sveltekit 😘🤗👍🤩😍🤓👏

  • @branislav3800
    @branislav3800 Год назад

    0:35 how is the JS from Svelte different from the JS libraries?

    • @IamSH1VA
      @IamSH1VA Год назад +1

      It’s like a compiler.

  • @JLarky
    @JLarky Год назад +2

    I appreciate the effort everyone went to to avoid calling out the fact that Solid had higher satisfaction for two years in a row now

    • @shubitoxX
      @shubitoxX Год назад +1

      sounds like some people just prefer to stay in the mental model of react then for reasons we don't know but that's fine as we don't need the whole world to follow one model (imperative/functional vs declarative)

    • @JLarky
      @JLarky Год назад

      @@shubitoxX how is React relevant in a discussion of Svelte and Solid?

    • @shrin210
      @shrin210 Год назад

      ​​​@@shubitoxX You're dumb i guess, to compare mental model of React and Solid on the basis of JSX.
      Afterall Svelte Runes totally copied the mental model Solid Js now 😂😂

    • @francoistaljaard8322
      @francoistaljaard8322 Год назад

      Solid came to mind. Not familiar enough with svelte or solid to comment much. Currently vuejs developer but I have my eye on solid..

  • @goodjesse711
    @goodjesse711 Год назад +4

    I'd probably use Svelte if Solidjs didn't exist.

    • @hasan_haja
      @hasan_haja Год назад +1

      Yeah same! Svelte feels fun to write, but Solid is just great all round!

    • @aquaductape
      @aquaductape Год назад +2

      solid

    • @talmann
      @talmann Год назад +3

      I’d use solidjs rather than sveltekit if most of my experience were with react rather than angular 🙂

    • @majorhumbert676
      @majorhumbert676 Год назад

      I'd use that if Elm didn't exist.