Company logo
  • Jobs
  • Bootcamp
  • About Us
  • For professionals
    • Home
    • Jobs
    • Courses and challenges
    • Questions
    • Teachers
    • Bootcamp
  • For business
    • Home
    • Our process
    • Plans
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Calculator

0

58
Views
styling css by confdition from the backend

dealing with reactjs, can we change css style with condition from the backend ?

to give an exemple, if the API returns true the background become blue, if returns false the background become green

7 months ago · Juan Pablo Isaza
1 answers
Answer question

0

yeah, you can do like this:

<div className={`${true ? 'blue' : 'green'}`} />
7 months ago · Juan Pablo Isaza Report
Answer question
Find remote jobs