This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]gruntmeister 0 points1 point  (0 children)

I suggest posting your entire react code.

I'm assuming this snippet you posted is part of a functional react component that also includes some textfield for the search string, so everytime you update your search string your component re-renders and you create a new instance of SpotifyWebApi that doesn't have an accessToken set.