Skip to main content

What's new in Svelte: October 2024

Better each blocks and a callstack for infinite loops

It's October! Which can only mean one thing... Svelte Summit Fall is only 19 days away! Stay up to date with the latest Svelte Summit news by subscribing to its official newsletter or follow along during the stream on the Discord.

Thanks to the number of folks who have been trying the Svelte 5 release candidates, the maintainers have been hard at work in addressing bugs and implementing performance improvements for the upcoming release. This month, we'll cover the most notable changes along with the many apps, resources and libraries that the community has created over the last few weeks.

What's new in Svelte

Have you been wanting to migrate your project to Svelte 5? Want to test out the migration tool and give the team feedback? Then you should give the svelte-migrate tool a try! npx svelte-migrate svelte-5 is all you need to get started. If you run into any problems, please file an issue.

Here's what else is new...

  • Legacy components can now be manually instantiated asynchronously with the sync option (5.0.0-next.237, #12970)
  • The each block is now much better in SSR mode - removing an unnecessary declaration and caching the length of the array before iterating over it (5.0.0-next.242, #13060)
  • A callstack will now appear if an infinite loop is detected - with the last ten effects printed out - in development mode (5.0.0-next.246, #13231)
  • Projects that use @sveltejs/enhanced-img should see a much smaller bundle thanks to module variables being inlined into the template (5.0.0-next.246, #13075)
  • There are now a11y warnings for <button>/<a> elements that are missing an aria-label and content (5.0.0-next.250, #13130)
  • Animations now take into account zoom when calculating transforms (5.0.0-next.254, #13317)
  • <svelte:self> is now deprecated in runes mode. It's not necessary since components can now import themselves (5.0.0-next.256, #13333)
  • svelte-check, the CLI is used by almost every Svelte project, is now much smaller (repo, post)

Curious to see all that the maintainers have been up to in getting Svelte 5 production ready? Check out the CHANGELOG to see all the fixes - big and small!

What's new in SvelteKit and Language Tools

  • SvelteKit now suports typed arrays in load functions. It's "not something to over-use, since it uses base64 encoding which is 33% larger than the raw data, but useful when you need it"(2.6.0, #12716)
  • Components typed through Svelte 5's Component interface get proper intellisense (extensions-109.0.1)

Community Showcase

Apps & Sites built with Svelte

  • svelte0.dev lets you generate Svelte UIs using shadcn/ui via a text prompt
  • Mini Spreadsheet Component is a great introduction to how reactivity works in Svelte
  • Poof is a self-destructing notes app that includes features like an optional to do list, email alerts and deleting after a specific date
  • kunft is a cloud platform for deploying docker containers and apps directly from GitHub
  • quickprompt is a browser extension to make saving and retrieving ChatGPT prompts easy
  • Dither is a lo-fi GIF chat app inspired by Return of the Obra Dinn and Meatspac.es
  • cobalt helps you save anything from your favorite websites: video, audio, photos or gifs
  • YouTube Looper is a custom loops extension for Youtube videos
  • LeetLink is a linktree-a-like with customizable themes
  • WhatChord is a chord finder for piano
  • AIUI is a web UI for OAI-Compatible APIs

Learning Resources

Featuring Svelte Contributors and Ambassadors

This Week in Svelte

  • Ep. 74 — Changelog, race and maybeStream, svelte:component obsolete
  • Ep. 75 — Changelog, $props, $state
  • Ep. 76 — Changelog, svelte-fsm, script module, trailing slash
  • Ep. 77 — Changelog, Context API, JSX and Single FIle Components
  • Ep. 78 — Changelog, Indeterminate checkbox, classes and actions

Svienna 09/2024

To Read

To Watch

Libraries, Tools & Components

  • Tzezar's Datagrid is an easy to use and easy to customize datagrid component
  • SparklePost is a demo application that implements interface patterns commonly found in native iOS and Android apps, using modern and performant web development techniques
  • tipex is a customizable rich text editor for SvelteKit; based on TipTap

That's it for this month! Let us know if we missed anything on Reddit or Discord.

Until next time 👋