Skip to content

Commit d20f7cc

Browse files
committed
upd
1 parent 3a0b3c9 commit d20f7cc

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/whackds.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,10 @@ x // x={true}
114114

115115
// Event handlers
116116
event&={println!("hi");}
117-
// equivalent to `event={Rc::new(|event, detail|{println!("hi");})}}`
117+
// equivalent to `event={Handler(Rc::new(|event, detail|{println!("hi");})})}`
118118

119119
// Functions
120-
f|={f} // equivalent to `f={Rc::new(f)}}`
120+
f|={f} // equivalent to `f={Handler(Rc::new(f))}}`
121121

122122
// Inline styles
123123
s:style_property="css exp"
@@ -188,9 +188,9 @@ x: impl Fn(...),
188188
x: impl Fn(...) -> T,
189189
```
190190

191-
yields a `Rc<dyn Fn(...) + 'static>` field.
191+
yields a `Handler<dyn Fn(...) + 'static>` field.
192192

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.
194194

195195
### Function (optional)
196196

@@ -199,9 +199,9 @@ x: Option<impl Fn(...)>,
199199
x: Option<impl Fn(...) -> T>,
200200
```
201201

202-
yields an `Option<Rc<dyn Fn(...) + 'static>>` field.
202+
yields an `Option<Handler<dyn Fn(...) + 'static>>` field.
203203

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.
205205

206206
### Implicit
207207

0 commit comments

Comments
 (0)