We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 692ca14 commit 2269cf4Copy full SHA for 2269cf4
content/docs/addons-test-utils.md
@@ -66,15 +66,15 @@ Simulate an event dispatch on a DOM node with optional `eventData` event data.
66
**Clicking an element**
67
68
```javascript
69
-// <button ref={(btn) => this.button = btn}>...<button>
+// <button ref={(node) => this.button = node}>...</button>
70
const node = this.button;
71
ReactTestUtils.Simulate.click(node);
72
```
73
74
**Changing the value of an input field and then pressing ENTER.**
75
76
77
-// <input ref={(input) => this.textInput = input} />
+// <input ref={(node) => this.textInput = node} />
78
const node = this.textInput;
79
node.value = 'giraffe';
80
ReactTestUtils.Simulate.change(node);
0 commit comments