Skip to content
Advertisement

Tag: vscode-debugger

Updating State in React Component causing it to get unmounted

I have a component where-in I need to fetch some data and render it. The component gets rendered initially. The problem I’m facing is when the handler function switchDocumentType is called after clicking the button for a particular type, the whole component gets unmounted/un-rendered. While debugging on my own I found this happens after setDocumentType is run inside event handler

How to run html & javascript in VS Code

I have the following code. How do I run this in VS Code with the debugger. I installed and tried live-server but maybe not doing it correctly. index.html index.js Answer You can install the following extensions. Live Server. Chrome Debugger. Once you have these two extensions installed, open the page index.html using the live server and then press F12 to

Advertisement