I'm building a dashboard using the Spotify API, I've created the fetching function in a file called data.ts, used it in the page.tsx file of the route and passed down the data to the components of the page as props.
First, is this the correct way to do it?
Then, if the user refreshes multiple times the same page, will this trigger the fetch function every time? This will give a 429 error.
#"Too many requests", how to prevent a user from doing too many page refreshes?
4 messages · Page 1 of 1 (latest)
🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord
🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize
✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)
You should cache the data so you don't hit spotify's api again and again
So static rendering? cache all the data that I'm getting through the fetch function in the different pages?
I thought that static rendering is not good for dashboards since you have to show the updates and the latest data available. For example I have a table that shows the recently played songs.