-
spotify-web-playback-sdk-example
React based example app that creates a new player in Spotify Connect to play music from in the browse using Spotify Web Playback SDK.
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
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!