Next.js Discord

Discord Forum

Custom ref and onFocus, onBlur with react-hook-form

Unanswered
Common carp posted this in #help-forum
Open in Discord
Common carpOP
            <motion.input
                animate={{ border: isFocused ? '1px solid #7527f1' : '1px solid #bebebe' }}
                className={classes.input}
                type={type}
                id={id}
                {...props}
                {...register(id)}
                onFocus={handleFocus}
                onBlur={handleBlur}
                ref={input}
            />


Hey, i want to pass my own functions for onFocus and onBlur while registering input. Do you know any workaround around this?
This is react-hook-form library

0 Replies