It is important that this component is nested under the <Formik> component so it can access the necessary properties inside the useField() hook. You can provide additional styling properties to theFormikTextField component similarly as to the original TextField component.
Hi! Giacomo, i don't get how to compose usefield hook with material-ui TextField. Can you write a quick example ?
Hello, I have created an example of how to use an useField hook with material-ui TextField.
Below is a simple FormikTextField component, that can be reused across the whole application.
It is important that this component is nested under the
<Formik>
component so it can access the necessary properties inside the useField() hook. You can provide additional styling properties to theFormikTextField
component similarly as to the originalTextField
component.