Skip to content

A component suspended while responding to synchronous input #1832

@Nabeel-Mhd

Description

@Nabeel-Mhd

So I was using the useTranslation inside a Modal, I got this issue.
when I removed those lines of code which corresponds to useTranslation, Modal worked fine.

A component suspended while responding to synchronous input. This will cause the UI to be replaced with a loading indicator. To fix, updates that suspend should be wrapped with startTransition.

const { t, i18n } = useTranslation([ "common"]);

Even above line of code breaks the code.

Activity

adrai

adrai commented on Feb 10, 2025

@adrai
Member

Please provide a minimal reproducible example repository.

stale

stale commented on Apr 26, 2025

@stale

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

johannchopin-buyco

johannchopin-buyco commented on Apr 28, 2025

@johannchopin-buyco

I got this issue within tests using react-testing-library. We did a migration and didn't properly handle the Suspense usage from the newer version. We just disabled the useSuspense option and it worked 👍

See https://react.i18next.com/latest/migrating-v9-to-v10#migration

i18n.init({
  react: {
    useSuspense: false
  }
});
stale

stale commented on May 6, 2025

@stale

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @adrai@johannchopin-buyco@Nabeel-Mhd

        Issue actions

          A component suspended while responding to synchronous input · Issue #1832 · i18next/react-i18next