Last active
April 22, 2018 10:44
-
-
Save kettanaito/cfdd27fc96cfe8a1f3787cb5524f067e to your computer and use it in GitHub Desktop.
React Advanced Form - Reactive props
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Input | |
name="firstName" | |
required={({ get }) => { | |
// resolves any time "value" prop of "lastName" changes | |
return !!get(['lastName', 'value']); | |
}} /> | |
<Input | |
name="lastName" | |
required={({ get }) => { | |
// resolves any time "value" prop of "firstName" changes | |
return !!get(['firstName', 'value']); | |
}} /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment