Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Where did reactFormalContext go? #150

Open
andres-gr opened this issue May 11, 2018 · 1 comment
Open

Where did reactFormalContext go? #150

andres-gr opened this issue May 11, 2018 · 1 comment

Comments

@andres-gr
Copy link

So it seems I had a very outdated version of react-formal, and now that I updated to the latest version I see that reactFormalContext is no longer being used.

Would like to know how does a child component of a <Form /> get access to the info from said component.

I would like to be able to access the current values of the form or the current errors if any, how can I access either of those values from a component inside a <Form />?

Also, I think the documentation at the moment is somewhat lacking.

@jquense
Copy link
Owner

jquense commented May 12, 2018

Hey there, generally the best way to get access to the form values is via the Field component and a function child. Otherwise tho there isn't really a public low level API for that, especially as we are moving towards using the new context API. You can check out For trigger solve for how it accesses values I'd be careful tho the apis here are likely to change over the new few versions as I'm working on a lot of overhauls there, which will hopefully unlock a lot of potentially new features

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

No branches or pull requests

2 participants