Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

#region for JSX

I'm working with React/React Native with VS Code.

Some times, especially when you are trying to refactor someone's work, you need something like

#region regionName

...

#endregion

Is there any alternative for JSX?

like image 840
Lasharela Avatar asked Mar 03 '26 08:03

Lasharela


1 Answers

While it's a bit clunky, this is working for me, VS Code version 1.48.0.

... JSX ...
{
  //#region
}
... JSX, will hide with the Fold All Regions command ...
{
  //#endregion
}
... JSX ...
like image 154
kentr Avatar answered Mar 05 '26 21:03

kentr



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!