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: src/whackds.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -114,10 +114,10 @@ x // x={true}
114
114
115
115
// Event handlers
116
116
event&={println!("hi");}
117
-
// equivalent to `event={Rc::new(|event, detail|{println!("hi");})}}`
117
+
// equivalent to `event={Handler(Rc::new(|event, detail|{println!("hi");})})}`
118
118
119
119
// Functions
120
-
f|={f} // equivalent to `f={Rc::new(f)}}`
120
+
f|={f} // equivalent to `f={Handler(Rc::new(f))}}`
121
121
122
122
// Inline styles
123
123
s:style_property="css exp"
@@ -188,9 +188,9 @@ x: impl Fn(...),
188
188
x:implFn(...) ->T,
189
189
```
190
190
191
-
yields a `Rc<dyn Fn(...) + 'static>` field.
191
+
yields a `Handler<dyn Fn(...) + 'static>` field.
192
192
193
-
During memoization, equality always returns `true` to avoid re-rendering the component. It is assumed that these functions are always never changing.
193
+
During memoization, equality, by default, always returns `true` to avoid re-rendering the component. It is assumed that these functions are always never changing.
194
194
195
195
### Function (optional)
196
196
@@ -199,9 +199,9 @@ x: Option<impl Fn(...)>,
199
199
x:Option<implFn(...) ->T>,
200
200
```
201
201
202
-
yields an `Option<Rc<dyn Fn(...) + 'static>>` field.
202
+
yields an `Option<Handler<dyn Fn(...) + 'static>>` field.
203
203
204
-
During memoization, the equality comparison of the function objects always returns `true` to avoid re-rendering the component. It is assumed that these functions are always never changing.
204
+
During memoization, the equality comparison of the function objects always returns `true`by default to avoid re-rendering the component. It is assumed that these functions are always never changing.
0 commit comments