Web appOpen in Telegram

MessageTrabajando en React tengo este problema....

14 September 2020
C
Trabajando en React tengo este problema.... Tengo el siguiente componente: const VolcanoDateField = (props) => { const { date, format } = props; const { i18n } = useTranslation(); const datetime = new Date(date); const getDateString = (short) => { let stringDate = ""; if (datetime !== undefined) { stringDate = Intl.DateTimeFormat(i18n.language, { timeZone: "Europe/London", year: "numeric", month: short ? "2-digit" : "long", day: "2-digit", }).format(datetime); } return stringDate; }; const getTimeString = () => { let stringTime = ""; if (datetime !== undefined) { stringTime = Intl.DateTimeFormat(i18n.language, { timeZone: "Europe/London", hour12: false, hour: "numeric", minute: "numeric", second: "numeric", }).format(datetime); } return stringTime; }; const buildObjectFromDate = () => { switch (format) { case constants.SHORT_DATETIME: return ( <div> {getDateString(true)} <br /> {getTimeString()} </div> ); break; case constants.LONG_DATETIME: return ( <div> {getDateString(false)} <br /> {getTimeString()} </div> ); break; case constants.ONLY_DATE: return <div>{getDateString(true)}</div>; break; case constants.ONLY_LONG_DATE: return <div>{getDateString(false)}</div>; break; case constants.ONLY_TIME: return <div>{getTimeString(false)}</div>; break; default: return ""; } }; return ( buildObjectFromDate() ); }; Según entiendo todo está bien y retorna lo adecuado (string o JSX) pero cuando intento invocarlo así: <MyDateField date={entity} format={constants.SHORT_DATETIME} /> El navegador devuelve el siguiente error: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.

Nearby in the feed

NNazaY al escribir en el input, debería sacarme las opciones que tengo, pero no me sale, y llevo atascada 2 días aquí... No puedo avanzar en el cursoNNaza😭
this message
CCayetano H. OsmaAgradecería alguna ayudita...CCayetano H. OsmaListo! Arreglado! Gracias!!
JJavaScript EsJavaScript Es@javascriptes · group · Tech
4 133members47 611messages in the index
Venue feed Open in Telegram

An open public feed from the search index ChatCrawler — “Google for public Telegram”; refreshed as the venue is crawled. Times are UTC.

Public content only, official Telegram API. About · FAQ · What we do not do · Remove a page · Catalog · Search · How we count