Next.js Discord

Discord Forum

duplicate api requests with suspense

Unanswered
Cape lion posted this in #help-forum
Open in Discord
Cape lionOP
i recently added suspense to my component with a loading skeleton rather than using a state to display/hide loading states.

this introduced some issues. on local dev when i refresh the page it shows the loading skeleton and then the data loads in, but when i deploy it to my aws amplify and refresh it the data is already loaded in without the loading skeleton and after checking the networks tab it's making 3 separate requests to the api.

why is this happening and how can i fix it? i've tried removing every type of cache on amplify

2 Replies

Polish Lowland Sheepdog
I also have this issue!
I'm not sure what you mean... The requests are made on the server, not the client