Browse Source

counterexample -> antipattern

main
Ben Alpert 10 years ago
parent
commit
2bcc761667
  1. 2
      docs/07-forms.md
  2. 4
      docs/08.1-more-about-refs.md

2
docs/07-forms.md

@ -129,7 +129,7 @@ Since this method describes the view at any point in time, the value of the text
In HTML, the value of `<textarea>` is usually set using its children:
```html
<!-- counterexample: DO NOT DO THIS! -->
<!-- antipattern: DO NOT DO THIS! -->
<textarea name="description">This is the description.</textarea>
```

4
docs/08.1-more-about-refs.md

@ -48,7 +48,7 @@ Notice how, in this example, we want to "tell" the input something - something t
This means that you should never "hold onto" something that you return from `render()` and then expect it to be anything meaningful.
```javascript
// counterexample: DO NOT DO THIS!
// antipattern: This won't work.
render: function() {
var myInput = <input />; // I'm going to try to call methods on this
this.rememberThisInput = myInput; // input at some point in the future! YAY!
@ -61,7 +61,7 @@ This means that you should never "hold onto" something that you return from `ren
}
```
In this counterexample, the `<input />` is merely a *description* of an `<input />`. This description is used to create a *real* **backing instance** for the `<input />`.
In this example, the `<input />` is merely a *description* of an `<input />`. This description is used to create a *real* **backing instance** for the `<input />`.
So how do we talk to the *real* backing instance of the input?

Loading…
Cancel
Save