Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import Button, {ButtonProps} from 'react-bootstrap/Button';
- const WrappedBtn = React.forwardRef<Button, ButtonProps>((props, ref) => <Button {...props} ref={ref} className="some-special-class" />
- // elsewhere...
- <WrappedBtn ref={ref}>Foobar</WrappedBtn> // won't compile because of error
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement