Skip to content

A deeply reactive derived variable #16189

@aster-void

Description

@aster-void

Describe the problem

As written in the svelte doc, variable declared with $derived are not converted to deeply reactive proxies:
https://svelte.dev/docs/svelte/$derived#Deriveds-and-reactivity

The only way there currently seems to be is using $state to create the derived variable and $effect to reflect the changes.

related discussion: #16187

Describe the proposed solution

I want something that allows me to natively do that.

maybe something like

const thisIsDeeplyReactive = $derived($state(source));

Importance

nice to have

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy