Skip to content
Discussion options

You must be logged in to vote

@niikkiin, @bluebill1049

The current reactstrap version 9 is using prop "innerRef" for Input component while "react-hook-form" expects prop "ref" to be registered.

I would suggest to pass "ref" from "register('email')" into Input component like this:

const { ref, ...registerEmail } = register('email');

<Input innerRef={ref} {...registerEmail} />

Working demo: https://codesandbox.io/s/jovial-dirac-17zpy4?file=/src/App.tsx

Replies: 4 comments 16 replies

Comment options

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

Comment options

You must be logged in to vote
8 replies
@soumyaexavalu
Comment options

@vitalijalbu
Comment options

@mrideout1985
Comment options

@leapful
Comment options

leapful Mar 4, 2023
Collaborator

@vitalijalbu
Comment options

Answer selected by bluebill1049
Comment options

You must be logged in to vote
2 replies
@craigmcc
Comment options

@vitalijalbu
Comment options

Comment options

You must be logged in to vote
5 replies
@yoadmash
Comment options

@MohammadAttarzoghi
Comment options

@yoadmash
Comment options

@kazitanvirahsan
Comment options

@Odigietony
Comment options

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