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

192
Views
How to convert Vue classess to React classess?

I am React Developer and I have a project in Vue to recode in React. I've never touched Vue so a lot of things are mysteries for me. I got Vue dynamic classes and I want to 'translate' them into React code. Can somebody help me, give me a scheme? This is an example:

     <div
    class="relative"
    :class="{
      'h-10 w-10': size === 'sm',
      'h-12 w-12': size === 'md',
      'h-14 w-14': size === 'lg',
    }"
  >
</div>

How to get the same effect in React? And what if there are v-if and v-else?

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

You can try out this:

className={ "relative " +
 (size === 'sm' && " h-10 w-10 ") +
 (size === 'md' && " h-12 w-12 ") +
 (size === 'lg' && " h-14 w-14 ")
}
about 4 years ago · Santiago Trujillo 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!