Skip to content
This repository was archived by the owner on Sep 21, 2021. It is now read-only.

Commit 3983762

Browse files
committed
Use callback-style ref.
1 parent 74f2184 commit 3983762

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

packages/devtools-launchpad/src/components/LandingPage.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ class LandingPage extends Component {
7272
}
7373

7474
componentDidUpdate() {
75-
if (this.refs.filterInput) {
76-
this.refs.filterInput.focus();
75+
if (this.filterInput) {
76+
this.filterInput.focus();
7777
}
7878
}
7979

@@ -192,7 +192,9 @@ class LandingPage extends Component {
192192
return dom.header(
193193
{},
194194
dom.input({
195-
ref: "filterInput",
195+
ref: node => {
196+
this.filterInput = node;
197+
},
196198
placeholder: "Filter tabs",
197199
value: filterString,
198200
autoFocus: true,

0 commit comments

Comments
 (0)