const [isActive, setisActive] = React.useState(false);
<button onClick={() => setisActive((isActive = true))} className={isActive ? 'likeBtn_active' : 'likeBtn'}>
const [isActive, setisActive] = React.useState(false);
<button onClick={() => setisActive((isActive = true))} className={isActive ? 'likeBtn_active' : 'likeBtn'}>
<button onClick={() => setisActive((prevActive) => !prevActive)} className={isActive ? 'likeBtn_active' : 'likeBtn'}>
Если я правильно понял