#my route is not static only if i use a
1 messages · Page 1 of 1 (latest)
Hi @sacred river. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
The communication barrier is hard.
Sorry @sacred river, I seem to be having a bit of trouble. Don't worry though, I've pinged my supprt and they will try to fix me up! :technologist:
Perhaps try again in 15mins?
Its as simple as this
dynamic = "page is rendered on every request"
static = "page is rendered and then stored in a cache for later requests"
generateStaticParams makes the rendering static, and builds stuff at build time so its already made.
if you dynamicParams = true (which is default) it allows stuff to be built even if its not in genereateStaticParams
but after initial request its just going to start giving the cache
dynamic will always mean the page is rendered at request time
so you cant have some be dynamic and some be static
the route itself has a dynamic parameter yes
but the route itself IS dynamic or static
but you can have ISR or ODR with static
yea
import React from "react";
export const generateStaticParams = async () => {
return [
{ slug: 'a' },
{ slug: 'b' },
]
};
const MovieIdPage = async ({ params }) => {
const response = await fetch("something");
return (
<div>
</div>
);
};
export default MovieIdPage;
Here, at build time, I will have 2 pages rendered as static
yes
For the others, on first request, they will be rendered at build time
after this, they will be static as the fetch keep cache
yes
your terminology is messing you up
npm run build yes
build -> /a /b html is rendered and stored
runtime -> /c /d html is created on first request and stored
Ok I understand.
Even I use here prisma for example instead of fetch, /c and /d will not change because I don't have define ISR or ODR.
Thank you for your help I didn't understand that with the docs
yes exactly
because when you make this example you don't know really if your page doesn't change because of fetch or because of rendering
I took notes of the documentations few days ago and I wrote => dynamic is only rendered at runtime and static only on build time. It was false lol
Is english language your native one ?
yes, and i mean what your saying is is kinda true still
dynamic is true statement
static is semi-true, just need to make a amendment lol
yes, depends on what you did with generateStaticParams lol
thank you to took all this time for me, really
yw
Hello, for information I found a possible linked issue here https://github.com/vercel/next.js/issues/46892
Hmm I’m not sure