You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Route /menus/[menuId] should not be pre-rendered. Instead, I can use useRouter() hook to handle dynamically client-side navigation.
Remove /menus/index.js
Make the /menus/[menuId] as a static page
Rely on URL query and routes with useRouter() hook
Implement fallback or loading indicator
Fetch single data from /api route after component initially mounted.
Route /menus/[menuId] pre-rendered not ahead-of-time but instead just-in-time.
Steps to reproduce
Initial page visit without cache hits.
EDIT:
It wasn't because of the pre-rendered pages that causing performance issues on the client. I'll investigate it deeper later. I'm guessing it is because of browser extensions that interfere with performance while I'm auditing the page.
The text was updated successfully, but these errors were encountered:
FPS dropped when the user scrolling through the whole page that has background image. And It only happened in a few browsers (chrome-based browser, especially),
This following code seems cost extra for the browser to repaint the page:
background-attachment: fixed;
And I did it in almost (or all) pages. See this line that I'm using bg-fixed util class.
Problems / Solutions / Workaround
/menus/[menuId]
should not be pre-rendered. Instead, I can useuseRouter()
hook to handle dynamically client-side navigation./menus/index.js
/menus/[menuId]
as a static pageuseRouter()
hook/api
route after component initially mounted./menus/[menuId]
pre-rendered not ahead-of-time but instead just-in-time.Steps to reproduce
EDIT:
The text was updated successfully, but these errors were encountered: