when I saw the doccumentation of Nextjs I found out that the difference between getServerSideProps
and getStaticProps
is that the first runs on every request while the second runs in the background and when using revalidate
.
but here I have this code inside my getStaticPros
export async function getStaticProps() {
console.log("this is my getStaticProps");
const response = axios.get("/words/get-all");
return {
props: {
words: response.data,
};
}
}
but every time I navigate to /words
page I see ""this is my getStaticProps" in the console. what I am missing ?