You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
441 B
16 lines
441 B
7 years ago
|
import FancyButton from './FancyButton';
|
||
|
|
||
|
// highlight-next-line
|
||
|
const ref = React.createRef();
|
||
|
|
||
|
// The FancyButton component we imported is the LogProps HOC.
|
||
|
// Even though the rendered output will be the same,
|
||
|
// Our ref will point to LogProps instead of the inner FancyButton component!
|
||
|
// This means we can't call e.g. ref.current.focus()
|
||
|
// highlight-range{4}
|
||
|
<FancyButton
|
||
|
label="Click Me"
|
||
|
handleClick={handleClick}
|
||
|
ref={ref}
|
||
|
/>;
|