Created
November 20, 2025 04:37
-
-
Save jaeyoung-kwon/6a1896afce53e296e0ff5e02f18da774 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function App({ show }: { show: boolean }) { | |
| if (show) { | |
| const [count, setCount] = useState(0); // 조건부 훅 호출 | |
| return <button onClick={() => setCount(count + 1)}>{count}</button>; | |
| } | |
| return <div>숨겨짐</div>; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment