does unstable_noStore only make a difference in production? I'm doing this tut https://nextjs.org/learn/dashboard-app/static-and-dynamic-rendering and if i comment out noStore() in
export async function fetchRevenue() {
// Add noStore() here prevent the response from being cached.
// This is equivalent to in fetch(..., {cache: 'no-store'}).
// noStore()
try {
// Artificially delay a response for demo purposes.
// Don't do this in production :)
console.log('Fetching revenue data...');
await new Promise((resolve) => setTimeout(resolve, 3000));
const data = await sql<Revenue>`SELECT * FROM revenue`
console.log('Data fetch completed after 3 seconds.');
return data.rows
} catch (error) {
console.error('Database Error:', error)
throw new Error('Failed to fetch revenue data.')
}
}
I see no difference on page load
Understand how rendering works in Next.js, and make your dashboard app dynamic.