Skip to content

Missing startTransition on auth pages #971

@Tobbe

Description

@Tobbe

Sometimes I see this error message when logging in and when resetting the password

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.

To solution seems to be to wrap navigate(routes.home()) in a startTransition, like this

  useEffect(() => {
    if (isAuthenticated) {
      startTransition(() => {
        navigate(routes.home())
      })
    }
  }, [isAuthenticated])

Change needed on LoginPage, ResetPasswordPage and SignupPage

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions