Troubleshooting and Enhancing Dashboard Interactivity with JavaScript and Wiz

In this meeting, the State Changers were focused on troubleshooting JavaScript code used within the web development platform, Webflow. They discussed a number of challenges surrounding code not running as expected, not having the correct data, and not updating when data changes.

The participants used developer tools to examine the errors and console logs for better insights. One of the primary issues identified was related to scoping in JavaScript, particularly in assigning variables using "const" keyword and attaching them to the window rather than using "var" which elevated the information to become global and shared across multiple script tags. They also reviewed how the code was organized and when certain parts execute. They found that the script was running too early before the page had fully loaded, causing issues with accessing the right data at the right time. To solve this, certain functions were moved to execute after authentication happens. Looking at how data was being drawn and represented, the State Changers explored the use of labels and datasets. They discovered that although labels were set up correctly, the datasets were appearing blank. They resolved this issue by declaring "var config" at the beginning of the script and then simply referring to "config" later on, running code to solve a particular JavaScript scoping problem. Overall, this meeting was a detailed dive into troubleshooting a complex issue with JavaScript script within a Webflow context. It could be very useful for anyone dealing with similar issues or wanting to improve their understanding of JavaScript scoping, coding organization, and using developer tools for debugging. Some platforms and tools mentioned include Wiz, Webflow, Javascript, Co-chair, and Google Maps API.

(Source: Office Hours 10/20 )

State Change Members Can View The Video Here

View This Video Now

Join State Change Risk-Free