Expose method of subscribing to form data
See original GitHub issueFeature request: I would like to be able to subscribe to form updates for the purpose of autosave without submission. I am currently using FormSpy
to do this but its render function is also triggered by parents rerendering:
<FormSpy subscription={{ values: true }}>
{({ values }) => {
onChange(values);
return null;
}}
</FormSpy>
It would nice if there was easy way to listen to updates without it also trigging on renders and gives the granularity subscriptions offer (debug
is too noisy). I could get hold of reactFinalForm
from context
but this in not part of the public API.
One of the following would work for me:
- An
onChange
prop onFormSpy
- A simular component that accepts
subcription
andonChange
asprops
- A component that fetches
reactFinalForm
from thecontext
reactFinalForm
being exposed as a render prop on Form
Am I missing something, is there already a way to do this?
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Best way to retrieve form data from a nested component in an ...
Best way to retrieve form data from a nested component in an Angular project - Stack Overflow. Stack Overflow for Teams – Start...
Read more >Angular Reactive Forms: Tips and Tricks | by Netanel Basal
The way we get around this is by using the updateOn property. We can tell Angular that we only want to run the...
Read more >How can I access data from Form outside react-final-form #419
So, I would like to acess the data from Form outside him, for example, I have multiple forms in only a page: props.reset()...
Read more >Rethinking the Data Management for React Forms
A better way to handle form data and UI in React. ... Input fields call the exposed function when the user updates it....
Read more >Sending a Request and Processing a Mapped Response to ...
In the above code, we used the createUsers() method to send our data to the server-side by using the POST Method. Here, we...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Published fix in
v1.2.0
.This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.