Skip to content

Svelte 5: make unstate apply to deeply nested object & keep property order #10595

Closed as not planned
@zhihengGet

Description

@zhihengGet

Describe the problem

if i have let b=$state(...) ; let a = {a: b} then a wont be plain js object with unstate(a) , i have to apply unstate to the a.a
plz consider making unstate work deeply.

another thing is that unstate changes the order of properties i.e $state({a,b,d,c}) , console.log unstate would return a b c d not abdc, i think its better to keep the original key ord

Describe the proposed solution

Importance

nice to have

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