A component suspended while responding to synchronous input
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.
Please provide a minimal reproducible example repository.
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.
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
}
});
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.