Conceptual
Login

Ref Unwrapping in Templates

In templates a top-level ref is used without .value because the compiler unwraps it automatically; refs nested inside non-reactive objects are not unwrapped, and refs stored as properties of a reactive object are unwrapped on property access in script code too.

This Concept is waiting for its first lesson!

In templates a top-level ref is used without .value because the compiler unwraps it automatically; refs nested inside non-reactive objects are not unwrapped, and refs stored as properties of a reactive object are unwrapped on property access in script code too.

Are you a teacher? Sign in to start contributing.

Sign In