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
Copy file name to clipboardExpand all lines: docs/guide/synced-values.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -83,7 +83,7 @@ counter = 1;
83
83
```
84
84
85
85
### Alternative `@value` syntax
86
-
You might have noticed the syntax for the counter above was gross because @syncedValue forces us to pass a type to access the overrides.
86
+
You might have noticed the gross `Number as ValueTypeTag<number>` syntax above. This is because `@syncedValue` forces us to pass a type to access the overrides.
87
87
If you want to override replicated on a primitive value, you can use `@value` which has a slightly different method signature of `{type, ...overrides}`
88
88
89
89
For example:
@@ -104,4 +104,4 @@ counter = 1;
104
104
```
105
105
106
106
The only difference between `@syncedValue` and `@value` is the arrangement of the arguments. `@value` allows you to set overrides without specifying a type.
107
-
Both are valid ways of representing the same thing.
107
+
**Both are valid** representations of the same thing.
0 commit comments