interface IButtonProps {
reference?: React.RefObject<HTMLButtonElement>
}
const button = (props: IButtonProps) => {
return (
<button ref={props.reference} />
)
}
<Button reference={props.reference} />
React button element
Pass down reference and apply the prop type to a Button
0 Comments
Add Comment
Log in to add a comment