Никита Бобченок
Posted on October 19, 2024
Hey, everybody
A problem (misunderstanding) has arisen with the useState hook.
I have two custom hooks:
1) useLocalStorage.ts
Used to interact with localstorage.
2) usePlaylist.ts
Used to add/remove playlists, as well as get the full playlist
I have a react component with which I add a new playlist using the usePlaylist hook
And then I have a react component that displays a list of playlists:
BUT AFTER ADDING A NEW PLAYLIST, THEIR LIST IS NOT UPDATED(only when the page is refreshed)
I have tried a lot of things, but maybe I missed something or misunderstood something, help please.
💖 💪 🙅 🚩
Никита Бобченок
Posted on October 19, 2024
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.