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

312
Views
How do you append a React Component to an html element

I tried to add a React.icon too my button, but it's a react component (with this syntax: ). My question now is how can I append this exact icon component to my button Element with DOM Manipulation? This is my current code:

        const para = document.createElement("p");
        const node = document.createTextNode("New Button");
        const uList = document.getElementById("uList");
        const btn = <button ><BsIcons.BsClockHistory /></button>
        listEl.appendChild(btn);
        para.appendChild(node);
        listEl.appendChild(para);
        uList.appendChild(listEl);
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You can build a Web Component from the React Code and then append it to any HTML element.

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!