📅  最后修改于: 2022-03-11 15:03:38.943000             🧑  作者: Mango
// You Should pass props to main functions and import useState
const [isActive, setActive] = useState(false);
const toggleClass = () => {
setActive(!isActive);
};