Skip to content

Provide more control over what gets proxified, pontentially making it opt-in #12364

@danielo515

Description

@danielo515

Describe the problem

I have an Obsidian plugin using Svelte 4. Being a plugin in a non conventional web environment means a lot of interaction between regular JS and svelte components.
This is being a problem because every time data goes through a svelte component everything gets proxified.
I don't even migrated all my components and, as soon as some data crosses the Svelte boundaries I get a deeply proxified object back.
This is very challenging, first because I don't know what the proxy application rules are, and secondly because, even if I do, I will have to take a lot of care to unproxify stuff.
I'm already getting a lot of trouble because of this: stores that get values that are proxies, infinite reactivity loops and other annoyances that are preventing me from migrating to Svelte5

Describe the proposed solution

I want to make proxies opt-in, or better document when and why things are converted to proxies. I don't think such agresive level of proxification is necessary. Svelte 4 had a better opt-in mechanism where you just use $: blocks to tell the compiler to track blocks and other stuff.

Importance

i cannot use svelte without it

Metadata

Metadata

Assignees

No one assigned

    Labels

    awaiting submitterneeds a reproduction, or clarification

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions