DEV Community

Saugat Rai
Saugat Rai

Posted on

4

Was not able to comment out jsx in react, so I made my own snippets

While I was on a react project, I was not able to comment out jsx which was really frustrating.

The way we comment out jsx is
{/* comment */}

But the default comment function on vscode doesnot comment out jsx. So, I made my own snippets to comment out jsx.

First, open command palette

Search for configure user snippets. But before choosing, look for the language type on your work file.

Then choose javascript or javascriptreact.

After that you will see some examples of how you can make a snippets. Copy below code and paste it.

"Comment out jsx": {
"prefix": "jsx",
"body": [
"{/*",
"${TM_SELECTED_TEXT}",
"*/}"
],
"description": "Comment out jsx"
}

Save the file and you are good to go.

Select the code you want to comment and insert snippets.

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read full post →

Top comments (0)