Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const [action, setAction] = useState("login"); //login is default value
- <StateChanger>
- {action === "login" ? (
- <>
- 계정이 없다면
- <Link onClick={() => setAction("signup")}>회원가입</Link> //setAction: change actions`s value
- </>
- ) : (
- <>
- 계정이 있다면
- <Link onClick={() => setAction("login")}>로그인</Link>
- </>
- )}
- </StateChanger>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement