Can we use 'Region' in in typescript react code?
Asked Answered
C

1

8

I am looking for how to use Region in .tsx code while using Visual studio code. In editor the intelisense shows //#region and //#endregion (might be due to some extension such as ES7 React/Redux/... or ESLint) but after placing it in code it gives errors.

Can someone know how to use that?

Content answered 17/11, 2021 at 10:47 Comment(2)
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer.Thyme
Please specify the errors you are getting.Motivate
C
12

you can do it.

// #region fields

somecode...

// #endregion
Cyrilcyrill answered 25/1, 2022 at 6:0 Comment(3)
This does not provide an answer to the question. Once you have sufficient reputation you will be able to comment on any post; instead, provide answers that don't require clarification from the asker. - From ReviewLogomachy
Workarounds are not answers (especially if you don't mention if it's a workaround, which may confuse readers as if it's an actual answer) - proper regions can expand/collapse, for example, among other features; at least in C#.Tenenbaum
@Tenenbaum this works for folding code. i confirmed this was also the case prior to your comment. as in this article from 2 years prior: dev.to/hurricaneinteractive/vs-code-define-a-region-1cd1Hooper

© 2022 - 2024 — McMap. All rights reserved.