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.
You can easily use the useField hook and transfer the field object as props to the material-ui TextField.
Take a look at this :)
jaredpalmer.com/formik/docs/api/us...
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 theFormikTextFieldcomponent similarly as to the originalTextFieldcomponent.