If I have a functional component and want to set a value outside of the Formik tag, how would I do that? Below is the code that I have for further clarification.
function XYZScreen() {
const someFunctionWithLogic = () => {
// Set the value of the number field here...
}
return (
<Screen>
<Formik>
<FormField name="number" placeholder="Number" />
</Formik>
</Screen>
);
}
I have reduced the code to as little as possible to simplify the question. The question might not make sense in the context of the question but I think it is clear what I am asking for.
If you need more code, please let me know, I am happy to provide it if needed.