Back browser button strange behavior #79476
Unanswered
StadnykYura
asked this question in
App Router
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
In our project we use NextJs App for initial rendering of the application on server, then the page is cached on cdn and all other subsequent user navigation is done with React-router/react-router-dom behaving like SPA. So we don`t go to the server on browser navigation, and NextJs Links are not used.
We also use [[..slug]] (all routes dynamic) for handling every request. This is current architecture due too complications of the project and recent migration to SSR and NextJs.
The problem we recently faced is:
it is doing long computations (the stacktrace goes to dispatch function which we do in client component called

StoreInitializer
where we initialize our redux store based on received RSC payload as props from server component);the last long task also has huuuuge stack trace of same recursive functions ( the trace is much much longer) on the next screen:

This top lvl Client component StoreInitializer, that previoulsy received some props from Server Components as RSC payload, throws some warnings on that back button click

There is no problem when the page is not reloaded on step '3'.
My question is::
Beta Was this translation helpful? Give feedback.
All reactions