1Standard fair:
2
3const [toggleClass, setToggleClass] = useState(false)
4
5return <div className={toggleClass ? 'some-class' : ''} />
6Using template literals:
7
8const [toggleClass, setToggleClass] = useState(false)
9
10return <div className={`some-class ${toggleClass ? 'some-class' :''}`} />