Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

100
Vistas
Cannot read properties of undefined (reading 'object') using formik

so this is my first time use formik and Yup and i got this error while using a function: TypeError Cannot read properties of undefined (reading 'object')

Code:

   import React from "react";
   import "./formikpostup.css";
   import { Formik } from "formik";
   import {Yup} from "yup";

  export default class FormikPostupload extends React.Component{
   uploadPost = Yup.object().shape({
   imageUrl: Yup.string().url().required('A url is required'),
   caption: Yup.string().max(200,'Caption has reached the maximum character limit')
   })

  render(){
    return(
      <div className="formik-upload-parent">
      <div>
      
      </div>
    </div>
   );
   } 
   }
almost 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

You need to import Yup correctly as:

import * as Yup from 'yup';
almost 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda