pageProps is undefined when when web view reloads in Capacitor app using SSG #74871
Unanswered
halileohalilei
asked this question in
Help
Replies: 1 comment 6 replies
-
What is the |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
I have a Capacitor app that uses Next.js with SSG to generate some static props that needs to be passed down to each individual page. This approach works fine most of the time and I see the props I want to see in each page. However I'm having issues in cases where Capacitor's web view reloads the page for any reason, e.g. the app stays in the background for too long. When the web view reloads the page,
pageProps
passed to my customApp
is just an empty object. This breaks the functionality of the app and the user needs to navigate to a different page and come back for things to go back to normal.One weird thing I was able to realise is that the JSON file that includes the static props for the current page is not fetched on reloads. It is, however, fetched and loaded properly on initial page loads.
I'm using
[email protected]
with Capacitor 6.Additional information
next info
output:Example
No response
Beta Was this translation helpful? Give feedback.
All reactions