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.
11 lines
347 B
11 lines
347 B
import FancyButton from './fancy-button';
|
|
|
|
const ref = React.createRef();
|
|
|
|
// Our ref will point to the FancyButton component,
|
|
// And not the ThemeContext.Consumer that wraps it.
|
|
// This means we can call FancyButton methods like ref.current.focus()
|
|
// highlight-next-line
|
|
<FancyButton ref={ref} onClick={handleClick}>
|
|
Click me!
|
|
</FancyButton>;
|
|
|