Skip to content

Svelte 5, I'm using $state.snapshot but a nested array is still a Proxy #12128

Closed
@frederikhors

Description

@frederikhors

Describe the bug

In the reproduction I'm using:

let input = $derived({
    condition: $state.snapshot(condition)
})

but after typing something in the text input in console I get:

{console.log("First, input:", input)}

image

Do you see the or field? Is still a Proxy.

Is maybe because $effect works on it after the snapshot?

In this case how to go without effect? Can I?

Reproduction

Svelte REPL

Severity

blocking an upgrade

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions