You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The initial featured and recent songs are fetched on the server for rendering the initial homepage (SSR). Upon clicking the button to load more recent songs, new songs are fetched and appended to the current list of loaded songs so the recent song list component can be rendered again.
However, fetchRecentSongs is part of the RecentSongsContext's useEffect hook, causing it to run on component mount. It thus replaces the songs fetched in the server with the ones that should follow it after clicking the button, causing two rows of the most recent songs to not appear in the homepage's first load.
Clicking a category button to select it, and then unselecting it again, causes the songs to appear as they should, as they get fetched from the backend again.
The text was updated successfully, but these errors were encountered:
The initial featured and recent songs are fetched on the server for rendering the initial homepage (SSR). Upon clicking the button to load more recent songs, new songs are fetched and appended to the current list of loaded songs so the recent song list component can be rendered again.
However,
fetchRecentSongs
is part of theRecentSongsContext
'suseEffect
hook, causing it to run on component mount. It thus replaces the songs fetched in the server with the ones that should follow it after clicking the button, causing two rows of the most recent songs to not appear in the homepage's first load.Clicking a category button to select it, and then unselecting it again, causes the songs to appear as they should, as they get fetched from the backend again.
The text was updated successfully, but these errors were encountered: