feat: <FormStateSubscribe /> component#13142
feat: <FormStateSubscribe /> component#13142bluebill1049 merged 6 commits intoreact-hook-form:masterfrom
Conversation
|
nice, i think we can just name it as |
|
@bluebill1049 as mentionned, FormState is already exported as a type Could be changing the FormState type export name to FormStateType but it also feels weird. |
|
Ah, my bad, I misread your comment! |
cef7d57 to
8f62e3b
Compare
|
#13142 (comment) |
|
I will release this a bit later, as i would need to update the doc on this before publish as well. 🙏 |
|
wow thanks! |
Documented in
react-hook-form/documentation#1179
Proposal
This is a follow up to the
<Watch />component addition.The component in itself isn't that complex. The main idea is to keep a consistent API between
useWatchanduseFormStateThe
<FormStateSubscribe />component is merely a wrapper around theuseFormStatelogic.The name "FormStateSubscribe" was chosen to keep the component's intention clear since "FormState" is already an existing type.
Currently
Goal
renderprop.