Skip to content
Discussion options

You must be logged in to vote

You can start optimizing your form by considering the use of uncontrolled Antd Input instead of controlled. It integrates well with the register form method.

Now, without knowing your actual use-case, there're many different things you can do to optimize the performance of your form. Consider searching though the discussions section of RHF repository for threads like #7611.

The main idea is to subscribe to values as deep down the React tree as possible where the information this info is relevant; make use of hooks like useWatch, useFormState, the getFieldState form method, instead of watching the form values and state (errors) at the root of your form. You can also look into the deps prop

Replies: 3 comments 5 replies

Comment options

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

Answer selected by bluebill1049
Comment options

You must be logged in to vote
4 replies
@bigbigbo
Comment options

@bluebill1049
Comment options

@bigbigbo
Comment options

@JamesWong1999
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants
Converted from issue

This discussion was converted from issue #8116 on March 30, 2022 15:16.