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
When using $derived to reference a nested reactive state (like this.icon.current) and the local property is named the same (current), it causes an error during server-side rendering (SSR). Renaming the local property to something else resolves the issue.
Reproduction
classHello{current=$state([]);}classWorld{icon=newHello();// Causes SSR error if property name is "current". renaming variable name solves errorcurrent=$derived({icon: this.icon.current,});constructor(){// Triggers the SSR issuethis.icon.current=["Hello","World"];}}constworld=newWorld();
Logs
//
System Info
//
Severity
annoyance
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
When using $derived to reference a nested reactive state (like this.icon.current) and the local property is named the same (current), it causes an error during server-side rendering (SSR). Renaming the local property to something else resolves the issue.
Reproduction
Logs
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: