Skip to content
Discussion options

You must be logged in to vote

Yeah, like @smhigley mentioned, Field is designed like a higher-order component that wraps an input component. Each individual form control uses the Field hooks to create an e.g. InputField or RadioGroupField, etc.

There are a few things that could make it easier to use with custom controls, which aren't specifically planned, but we could consider them:

  1. A makeField function that wraps a given component, rather than needing to use the useField_unstable, etc. hooks. This would make it simpler to create a field from any given input component.
    const MyInputField = makeField(MyInput);
    
    <MyInputField label="ExampleLabel" />
  2. A generic CustomField (name could be better), which takes the input e…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@behowell
Comment options

Answer selected by khmakoto
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
3 participants