Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

107
Views
i can't add html tag in ReactDOM render file in vscode
import React from 'react';
import ReactDOM from 'react-dom';

const data = < h1 > hello world! < /h1>
ReactDOM.render(data,
    document.getElementById('root')
);

Today I wanted to work on reactjs but I had a problem that when I save that code in vs code after the code changes, it puts extra spaces between them in the html tag which causes a bug. I wanted to know if any of you had this problem and could have a problem Thank you for helping me solve it

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Your code is fine. The render method does not require a component. A element like you have will work too.

This is a common problem in VS Code Studio typically due to editor settings or extensions.

See a few answers for potential solutions:

  • eslint/prettier adding unwanted space into html tags
  • VSCODE inserting spaces via format on save
  • VSCode adds spaces inside HTML tags inside React code
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!