Skip to content
Discussion options

You must be logged in to vote

I got some help and it seems one needs to forward all (other) props as well to make it work:

const Test = React.forwardRef(({myProps, ...otherProps}, ref: React.Ref<HTMLDivElement>) => {
  return <Badge {...otherProps} ref={ref}>test</Badge>
})

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@steabert
Comment options

Answer selected by layershifter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant