Does ISR works for anyone in NextJS 13 Beta version?
I am doing the following by using revalidate
.
export const revalidate = 15;
When I perform npm run build
, it still ends up as a SSG (static site generated) page.
The symbol is empty white.
What am I missing? I was expecting the page to be ISR
.
P.S: Also tried with fetch api and { next: { revalidate: 15 }}
and outcome is the same.
In terminal, this is output after npm run build.
This is not a dynamic route.
Location is app/page.jsx So this opens at localhost:3000
import axios from "axios";
import Card from "@/components/Card";
export const revalidate = 15; // seems to have no effect
const AllCards = async () => {
const url = 'http://localhost:3001/cards';
const fetchCards = await axios.get(url);
const cards = fetchCards.data.data;
return (
<main>
<div className='text-3xl font-bold underline text-center mb-4 mt-4'>
All Cards
</div>
<div className='flex flex-wrap justify-center gap-2'>
{cards.map(c => <Card vanity={c.vanity} art={c.art} id={c.id} />)}
</div>
</main>
);
}
export default AllCards;