Skip to content

TextField - replace withFieldState HOC with useFieldState hook #925

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

Merged
merged 5 commits into from
Sep 6, 2020

Conversation

ethanshar
Copy link
Collaborator

I realize we can accomplish the functionality of withFieldState HOC with a hook.

Since it doesn't affect directly the render output and it just provides logic and data and because the whole TextField is implemented using function components, there's no reason not to use hooks.

Also, in this PR I declare the "validate" typings in the main component as well (even though it's repetitive) just for react-docgen

@ethanshar ethanshar requested a review from M-i-k-e-l September 6, 2020 13:52
@M-i-k-e-l M-i-k-e-l merged commit d9f704f into master Sep 6, 2020
@ethanshar ethanshar deleted the infra/TextField_useFieldState_hook branch September 21, 2020 08:02
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