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

179
Vistas
React.Suspense expected string after update

A recent update caused my React.Suspense fallback to throw this error:

Warning: React.jsx: 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.

This exact code used to work and I'm wondering if anyone has any thoughts on which package to roll back(?)

// App.jsx

<Suspense fallback={<Fallback/>}>...</Suspense>

Here's my Fallback component:

import Loader from 'react-loader-spinner';
import React from 'react';

export const MediaUploading = ({
  t = 'Grid',
  c = '#121d66',
  h = '60',
  w = '60',
}) => {
  return (
    <div className="media-uploading">
      <Loader type={t} color={c} height={h} width={w} timeout={0} />
    </div>
  );
};

// fallback
export const Fallback = ({
  t = 'Grid',
  c = '#121d66',
  h = '100',
  w = '100',
}) => {
  return (
    <div className="loading">
      <Loader type={t} color={c} height={h} width={w} timeout={0} />
    </div>
  );
};
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Looks like when react-loader-spinner moved to v5, they dropped their Loader component and removed the default export. So if you want to keep using the Loader, then stick to react-spinner-loader@4.

v4 - only has a default export (no named exports)

import Loader from "react-loader-spinner";

v5 - only has named exports (no default export)

import { Grid } from "react-loader-spinner";

enter image description here

about 4 years ago · Juan Pablo Isaza 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