MCPcopy Create free account
hub / github.com/QuarkGluonPlasma/react-course-code / App

Function App

transition-test/src/App3.tsx:5–18  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3import './App3.css';
4
5function App() {
6 const [flag, setFlag] = useState(true);
7
8 return <div>
9 <CSSTransition
10 in={flag}
11 appear={true}
12 timeout={1000}
13 >
14 <div id="box"></div>
15 </CSSTransition>
16 <button onClick={() => setFlag(!flag)}>{!flag ? '进入' : '离开'}</button>
17 </div>
18}
19
20export default App;

Callers

nothing calls this directly

Calls 1

useStateFunction · 0.90

Tested by

no test coverage detected