@nhost/nextjs 1.13.22: "Can't find variable: React" after upgrade

Upgrading @nhost/nextjs from 1.13.21 to 1.13.22 produced ReferenceError: Can't find variable: React in Next.js apps. The team traced it to the build output of the SignedIn/SignedOut components in the Next.js package, which suddenly emitted React.createElement(...) without importing React. A fixed build was released in @nhost/nextjs 1.13.25.

Upgrade to @nhost/nextjs 1.13.25 or later — the package build emitted React.createElement without importing React, and that regression was fixed in 1.13.25. If you must stay on 1.13.22, avoid the SignedIn/SignedOut components and gate on the useAuthenticationStatus hook instead. Source: https://github.com/nhost/nhost/issues/1914

Source: https://github.com/nhost/nhost/issues/1914