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

267
Views
how to implement span tag in an array to html
let array= ["<span style="font-weight:900">everthing</span> is perfect", "Look for opportunities in <span style="font-weight:900">every</span>change"]

array.map((arr) => {
          return (
              <div>
                {arr}
              </div>
          );
        })

Desired output:

everthing is perfect Look for opportunities in every change

My output:

<span style="font-weight:900">everthing</span> is perfect 
Look for opportunities in <span style="font-weight:900">every</span>change

please help me.

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

0

You must install a package for that.

yarn add react-html-parser
npm install react-html-parser

then.

import ReactHtmlParser from 'react-html-parser'; 
<div> { array.map((arr)=>(
    {ReactHtmlParser (arr)}
)) } </div>
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!