18a9c7e371
* Update `packages/` * Update examples * Update tests * Update bench * Update top level files * Fix build * trigger
24 lines
379 B
JavaScript
24 lines
379 B
JavaScript
import React from 'react'
|
|
import Link from 'next/link'
|
|
|
|
export default () => {
|
|
const myRef = React.createRef(null)
|
|
|
|
React.useEffect(() => {
|
|
if (!myRef.current) {
|
|
console.error(`ref wasn't updated`)
|
|
}
|
|
})
|
|
|
|
return (
|
|
<Link href="/">
|
|
<a
|
|
ref={el => {
|
|
myRef.current = el
|
|
}}
|
|
>
|
|
Click me
|
|
</a>
|
|
</Link>
|
|
)
|
|
}
|