Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

1.1K
Visualizações
A React component suspended while rendering, but no fallback UI was specified

I just started working on this new React app.

It was using <Suspense /> element in the component but I removed it. Then application is crashed with above error.

Is there any easy fix without know too much about <Suspense /> ?

enter image description here

over 4 years ago · Santiago Trujillo
3 Respostas
Responde à pergunta

0

You have 2 options:

  1. Without Using suspense, you can configure that i18n.js like this:

    i18n
      .use(XHR)
      .use(LanguageDetector)
      .init({
        react: { 
          useSuspense: false //   <---- this will do the magic
        }
    });
    
  2. Using Suspense, for example:

    <Suspense fallback={<div>Loading... </div>}>
          <App />
    </Suspense>

over 4 years ago · Santiago Trujillo Relatório

0

In order to fix this without putting Suspense back in, you would need to get rid of usages of React.lazy.

over 4 years ago · Santiago Trujillo Relatório

0

I know it's not exactly @IshanPatel's problem but what can cause this error message is if you use a hook like useTranslation() directly inside of the function holding <Suspense />. The solution is to move that code simply into a separate function and have the hook there (see screenshot).

This came up first on Google and I guess someone could waste a long time on finding a fix so I wanted to share it as comment.

Screenshot

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda