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
CodePudding user response:
yeah, you can do like this:
<div className={`${true ? 'blue' : 'green'}`} />