Skip to content

Comments

🚄 perf: memoize FormProvider context value to prevent unnecessary rerenders#13235

Merged
bluebill1049 merged 2 commits intoreact-hook-form:masterfrom
newsiberian:memoize-form-provider
Jan 4, 2026
Merged

🚄 perf: memoize FormProvider context value to prevent unnecessary rerenders#13235
bluebill1049 merged 2 commits intoreact-hook-form:masterfrom
newsiberian:memoize-form-provider

Conversation

@newsiberian
Copy link
Contributor

@newsiberian newsiberian commented Jan 4, 2026

This PR adds memoization for _formControl.current.formState and also memoizes the entire context, since the context is now fully stable.

Partial work for #13233

@bluebill1049 bluebill1049 changed the title perf: memoize FormProvider context value to prevent unnecessary rerenders 🚄 perf: memoize FormProvider context value to prevent unnecessary rerenders Jan 4, 2026
@bluebill1049 bluebill1049 merged commit a084dcb into react-hook-form:master Jan 4, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants