Skip to content

reactivity to external entity does not workΒ #16727

@mgholam

Description

@mgholam

Describe the bug

export class Item{
	Name = "";
	Age = 0;
}
	import {Item} from "./entity.js"
	
	let data = $state(new Item()); // does not work
	//let data = $state({Name:"",Age:0});  // works

Reproduction

https://svelte.dev/playground/dc3e221656764453a5b6d3c14a7a1542?version=5.38.7

Logs

System Info

all

Severity

blocking an upgrade

Metadata

Metadata

Assignees

No one assigned

    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