Spotify SDK | Entity and Collection oriented | Browser and Node support!
React based example app that creates a new player in Spotify Connect to play music from in the browse using Spotify Web Playback SDK.Project mention: React states problem in spotify application | /r/react | 2023-02-27
I am new to React and decided to give it a shot for a simple web application using Spotify's Web Playback SDK. It's a neat library that basically allows you to connect to and control your music through your browser application. The SDK itself works for but when I try to use the official React example, I cannot get it to work properly. The issue is controlling the player (e.g. .togglePlay()) from within the returned JSX (Uncaught Type Error: this._streamer is null in the sdk's index.js) . It seems the object in the player state variable is not the same inside and outside of useEffect(). Controlling the player from within works - so does using a different approach with a global player variable set outside of the Component. Why is it not working in the given example, what am I missing? I appreciate any pointers in the right direction. Thanks!
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.