📜  切换类名 onclick 反应 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:07.385000             🧑  作者: Mango

代码示例2
import React, { useState } from "react";import "./styles.css";

export default function App() {
  const [isActive, setActive] = useState("false");
  const handleToggle = () => {
    setActive(!isActive);  };
  return (
    

Hello react

); }