Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

187
Views
Formik con redux y material ui

soy nuevo usando formik y redux, trato de crear una validación con yup usando formik y redux, pero no puedo hacer que esto funcione correctamente antes de implementar la lógica redux de formik, funciona correctamente, pero mi pregunta es qué puedo implementar dentro de formik a lógica redux, arriba está mi código:

 export const Login = () => { const dispatch = useDispatch(); const [value, setValue] = useState({ password: "", email: "" }); const handleChange = (event) => { setValue({ ...value, [event.target.name]: event.target.value }) }; const handleSubmit = async (e) => { e.preventDefault(); if (!value.email || !value.password) { return alert("Email and password are required"); } dispatch(loginPending()); try { const res = await login(value); dispatch(loginSuccess(res)); dispatch(getUserSuccess(res)); } catch (err) { dispatch(loginFailure(err)); } }; const formik = useFormik({ initialValues: { email: "", password: "", }, validationSchema: validationSchema, }); return ( <form onSubmit={formik.handleSubmit}> <WrapperInput> <Label>E-Mail</Label> <FormattedMessage id="placeholder_email" defaultMessage="Enter your e-mail" > {(placeholder) => ( <Input color="primary_orange" placeholder={placeholder[0]} name="email" value={formik.values.email} onChange={formik.handleChange} type="email" variant="outlined" validators={["required", "isEmail"]} errorMessages={["this field is required", "email is not valid"]} error={formik.touched.email && Boolean(formik.errors.email)} helperText={formik.touched.email && formik.errors.email} /> )} </FormattedMessage> </WrapperInput> <WrapperButton> <PrimaryButton type="submit" variant="contained"> Log In </PrimaryButton> </form> ) }

intento enviar un valor para iniciar sesión pero formik tiene valores, no sé cómo puedo hacer que formik entienda mi valor y no valores, si puedo intentar enviar formik.value.email el valor no se reconoce para formik.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!