1. 程式人生 > >[Tools] Region commands to collapse the code by group

[Tools] Region commands to collapse the code by group

For a file which contians lots of lines of code, we can use 'comments region' to collapse the code.

import "./styles.css";

// #region setup                              
document.getElementById("app").innerHTML = `
<h1>Hello Vanilla!</h1>
<div>
  We use Parcel to bundle this
sandbox, you can find more info about Parcel <a href="https://parceljs.org" target="_blank" rel="noopener noreferrer">here</a>. </div> `; // #endregion