I am new to ReactJS and JSX and I am having a little problem with the code below.
I am trying to add multiple classes to the className attribute on eac
This is how you can do that with ES6:
className = {`
text-right
${itemId === activeItemId ? 'active' : ''}
${anotherProperty === true ? 'class1' : 'class2'}
`}
You can list multiple classes and conditions and also you can include static classes. It is not necessary to add an additional library.
Good luck ;)