-
Notifications
You must be signed in to change notification settings - Fork 289
refactor: /change-password for dynamicIO #2185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: canary
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 105d11a The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
4 Skipped Deployments
|
105d11a
to
008445d
Compare
export default function Loading() { | ||
return null; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not great. I'd prefer if the server simply blocked while the dynamic page is rendered instead of immediately returning an empty loading state followed by streaming in the dynamic page later.
if (!customerEntityId || !token) { | ||
return redirect({ href: '/login', locale }); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be moved to middleware but then we'd be splitting business logic in two places, which is not great.
⚡️🏠 Lighthouse reportLighthouse ran against https://catalyst-canary-4a7ig63f8-bigcommerce-platform.vercel.app 🖥️ DesktopWe ran Lighthouse against the changes on a desktop and produced this report. Here's the summary:
📱 MobileWe ran Lighthouse against the changes on a mobile and produced this report. Here's the summary:
|
What/Why?
This is a WIP to try and understand what it would take to adopt
dynamicIO
. In this particular case, we want the page to be dynamic since it's fundamental nature is to rely on URL search params. There's some weird ergonomics due to howdynamicIO
works, though:loading.tsx
that returnsnull
to have a Suspense boundary since the component accessessearchParams
. Usinguse cache
isn't an option since we are accessing a dynamic API (searchParams
).dynamic
route segment config because it's not compatible withdynamicIO
.error.tsx
(the former is probably more appropriate so we can render something specific—error.tsx
is more intended for unexpected errors since it masks error details).Testing
This is still WIP, so testing is TODO.