Surprise! Svelte Secretly Sending Signals

Bookmark
Rate this content

Svelte 5 introduced runes which use signals under the hood. While signals are very cool and unlock a ton of composability possibilities they have their own gotchas... let's explore them while creating a reactive signal based system from scratch to really understand them from the base!

This talk has been presented at JSNation 2025, check out the latest edition of this JavaScript Conference.

FAQ

The speaker is Paolo Ricciuti, a Svelte ambassador and maintainer from Campobasso, Italy.

Paolo Ricciuti works as a senior software engineer, where he teaches and works with Svelte, participates in team augmentation, and organizes workshops.

The main topic of the talk is the implementation of reactivity in Svelte, particularly how signals are used to manage state and updates.

The writable store in Svelte is used to manage state with reactivity, using the observer pattern to notify subscribers when the state changes.

The proxy API allows interjecting operations on objects, simplifying state management by avoiding the need for explicit subscriptions for every state change.

Challenges include managing dependencies, cleaning up memory to avoid leaks, and handling asynchronous operations within effects.

Local storage can be used to persist state across page reloads. It is advised to synchronize local storage updates directly within state setting functions rather than using effects.

If the TC39 proposal for signals is adopted, it may reduce the need for custom implementations, though frameworks will still need to implement specific effects.

One complexity is handling unknown derived states, which require careful memory management to prevent leaks, especially when signals are used outside components.

The Svelte team is exploring experimental solutions to handle asynchronous functions within components, though challenges remain with async operations affecting reactivity.

Paolo Ricciuti
Paolo Ricciuti
28 min
12 Jun, 2025

Comments

Sign in or register to post your comment.
Video Summary and Transcription
Welcome to a talk on Surprise! Svelte Secretly Sending Signals by Paolo Ricciuti showcasing live coding with a demo of reactivity in Svelte using writable stores and the proxy API. The proxy API in Svelte allows for intercepting object operations to enhance reactivity. Efficient state management, event handling, and dependency management are key topics discussed. Strategies for managing dependencies, handling current and actual effects, clearing sets, scheduling functions efficiently, and handling signal memory cleanup in Svelte are covered. The talk also addresses signal-based frameworks, async issue solutions, and alternative approaches like Solid for handling signals sequentially.
Video transcription and chapters available for users with access.

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

Full Stack Documentation
JSNation 2022JSNation 2022
28 min
Full Stack Documentation
Top Content
The Talk discusses the shift to full-stack frameworks and the challenges of full-stack documentation. It highlights the power of interactive tutorials and the importance of user testing in software development. The Talk also introduces learn.svelte.dev, a platform for learning full-stack tools, and discusses the roadmap for SvelteKit and its documentation.
Svelte 5: North Star
JSNation US 2024JSNation US 2024
29 min
Svelte 5: North Star
Top Content
As a child, the speaker was fascinated with space and finding direction. Svelte is an HTML-first approach to web development that simplifies tasks and offers efficient reactivity. The speaker reflects on Svelte's growth, goals, and design philosophy. Svelte aims to fix broken software and prioritize user focus. The future direction includes error boundaries, better debugging, and AI's role. Building open source software is challenging, and Rust's impact is discussed. The speaker values framework diversity and highlights the advancements and challenges faced by web development.
The Wind and the Waves: The formation of Framework Waves from the Epicenter
JSNation 2022JSNation 2022
19 min
The Wind and the Waves: The formation of Framework Waves from the Epicenter
Top Content
Our understanding of innovation is wrong. Innovations are not introduced by a single point of light. The story of who invented the computer is not linear. Many steps forward led to the development of the computer. Angular has shaped and influenced multiple JavaScript waves, and Angular v14 simplifies development with standalone components.
Progressive Enhancement - What It Is and Isn’t, a Practical Introduction With Svelte
JSNation 2023JSNation 2023
20 min
Progressive Enhancement - What It Is and Isn’t, a Practical Introduction With Svelte
Progressive enhancement is a strategy that provides a baseline experience for all users while enhancing it for those with modern browsers. Feature detection and graceful degradation are complementary approaches to achieve this. Polyfills can emulate new browser functionality in old browsers. Progressive enhancement is about meeting user needs while considering performance. Building apps in SvelteKit allows for easy development of progressively enhanced apps. Svelte components and DOM content provide a convenient way to structure and update the UI. Form submission and progressive enhancement can be achieved by enabling file upload and processing when JavaScript is disabled.

Workshops on related topic

Build with SvelteKit and GraphQL
GraphQL Galaxy 2021GraphQL Galaxy 2021
140 min
Build with SvelteKit and GraphQL
Top Content
Workshop
Scott Spence
Scott Spence
Have you ever thought about building something that doesn't require a lot of boilerplate with a tiny bundle size? In this workshop, Scott Spence will go from hello world to covering routing and using endpoints in SvelteKit. You'll set up a backend GraphQL API then use GraphQL queries with SvelteKit to display the GraphQL API data. You'll build a fast secure project that uses SvelteKit's features, then deploy it as a fully static site. This course is for the Svelte curious who haven't had extensive experience with SvelteKit and want a deeper understanding of how to use it in practical applications.

Table of contents:
- Kick-off and Svelte introduction
- Initialise frontend project
- Tour of the SvelteKit skeleton project
- Configure backend project
- Query Data with GraphQL
- Fetching data to the frontend with GraphQL
- Styling
- Svelte directives
- Routing in SvelteKit
- Endpoints in SvelteKit
- Deploying to Netlify
- Navigation
- Mutations in GraphCMS
- Sending GraphQL Mutations via SvelteKit
- Q&A
Developing Dynamic Blogs with SvelteKit & Storyblok: A Hands-on Workshop
JSNation 2023JSNation 2023
174 min
Developing Dynamic Blogs with SvelteKit & Storyblok: A Hands-on Workshop
Top Content
WorkshopFree
Alba Silvente Fuentes
Roberto Butti
2 authors
This SvelteKit workshop explores the integration of 3rd party services, such as Storyblok, in a SvelteKit project. Participants will learn how to create a SvelteKit project, leverage Svelte components, and connect to external APIs. The workshop covers important concepts including SSR, CSR, static site generation, and deploying the application using adapters. By the end of the workshop, attendees will have a solid understanding of building SvelteKit applications with API integrations and be prepared for deployment.
Building with SvelteKit and GraphQL
JSNation 2022JSNation 2022
170 min
Building with SvelteKit and GraphQL
Workshop
Scott Spence
Scott Spence
Want to get familiar with the framework that took the top spot for most loved framework on the Stack Overflow developer survey in 2021?Svelte is a super versatile framework with no virtual dom unlike React and Vue, it's a compiler that builds your projects into vanilla HTML, CSS and JavaScript.This workshop will go over the basics of setting up with SvelteKit and querying data from a GraphQL API and using that data in SvelteKit to retrieve data for use in the client (browser).Key learnings:How to use SvelteKit to build a simple project retrieve data from a GraphQL API and display it in the client. Many of the core concepts of Svelte and SvelteKit will be covered in this workshop.
Build Full Featured Frontend App with Svelte
React Summit 2020React Summit 2020
192 min
Build Full Featured Frontend App with Svelte
Workshop
Mikhail Kuznetsov
Mikhail Kuznetsov
Svelte is a new prominent JS framework exposing “write less do more” philosophy. During this workshop you will get proficiency as a Svelte developer. We will be building an app that mimics the famous Q&A website stackoverflow.com. Will start developing from simple front end components, later we'll connect it to a real running backend and then test it and optimise for production.Attending a workshop is the fastest way to acquire a body of knowledge about building web apps with Svelte.