You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
having a variable declared as $state which is an object with properties that have no $state in their definition causes this warning
class Address {
street?: string
}
let address: Address = $state();
<TextInput bind:value={address.street}
These cause this warning and no value can be typed
client.js:2682 [svelte] binding_property_non_reactive bind:value={address.street} (src/lib/editor.svelte) is binding to a non-reactive property
Is there a way if the object variable is declared reactive $state allow all its properties despite not being declared reactive to behave like their are reactive?
Or how would this can be solved, in cases where the class definition is an external generated and no way of modifying to make it reactive and not having to redefine classes and manually copy them?
Reproduction
no need to repro just an example of the problem
Logs
No response
System Info
svelte 5 ---
Severity
blocking an upgrade
Additional Information
No response
The text was updated successfully, but these errors were encountered:
Describe the bug
having a variable declared as $state which is an object with properties that have no $state in their definition causes this warning
These cause this warning and no value can be typed
client.js:2682 [svelte] binding_property_non_reactive
bind:value={address.street}
(src/lib/editor.svelte) is binding to a non-reactive propertyIs there a way if the object variable is declared reactive $state allow all its properties despite not being declared reactive to behave like their are reactive?
Or how would this can be solved, in cases where the class definition is an external generated and no way of modifying to make it reactive and not having to redefine classes and manually copy them?
Reproduction
no need to repro just an example of the problem
Logs
No response
System Info
Severity
blocking an upgrade
Additional Information
No response
The text was updated successfully, but these errors were encountered: