()
| 3 | import './App3.css'; |
| 4 | |
| 5 | function 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 | |
| 20 | export default App; |
nothing calls this directly
no test coverage detected