Next.js Discord

Discord Forum

getStaticPath live pages generation?

Unanswered
West African Lion posted this in #help-forum
Open in Discord
West African LionOP
how to make the getStaticPath page regeration live?
like account created -> automatically create page in background
currently it's like account created -> required manual redeployment -> page creates

5 Replies

@West African Lion how to make the getStaticPath page regeration live? like account created -> automatically create page in background currently it's like account created -> required manual redeployment -> page creates
Since the page depends on user actions during runtime, it should be dynamically rendered, i.e. use getServerSideProps. Static methods (getStaticPaths, getStaticProps) are for static pages that don’t change throughout the entire deployment only.
West African LionOP
but it always shows 404 when new profile is created, but when I redeploy the site the profile page generates
@West African Lion but it always shows 404 when new profile is created, but when I redeploy the site the profile page generates
As I said. Use getServerSideProps. Not getStaticProps/getStaticPaths
@joulev As I said. Use getServerSideProps. Not getStaticProps/getStaticPaths
West African LionOP
Extreamly sorry I don't understand