Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- 백준 10172
- await
- barplot in r
- R데이터형태
- 이용현황분석
- vetor
- 데이터분석
- R 그래프
- 탈출문자
- 10172
- 그래픽
- React
- 값삭제
- asynchronization
- 값추가
- setstate
- 광명시버스분석
- 백준
- barplot
- 백준 11718
- 이스케이프시퀀스
- 배열삭제
- DataFrame
- react #회원가입 #비밀번호비교
- 배열추가
- plot in r
- 그대로 출력하기
- getline
- useState
- 버스분석
Archives
- Today
- Total
devlog_zz
회원가입 - 비밀번호 일치 여부 확인 본문
728x90
react 에서 setNewChkPwd하고 그 값과 비교를 하려고 했는데 set하고 바로 비교가 안됨
-> event.target.value 값으로 입력한 값과 비교
const isPwdSame = (pwd:string) => {
setNewChkPwd(pwd)
return newPwd === pwd ? setIsSame(true) : setIsSame(false)
}
...
<input type="password"
value={newChkPwd}
onChange={(e)=>isPwdSame(e.target.value)}/>
{newChkPwd.length>0 && !isSame &&
<p>비밀번호가 동일하지 않습니다.</p>
}
728x90
'Front End > React' 카테고리의 다른 글
부모 Component에서 자식 Component로 setState 전달하기 (0) | 2022.05.10 |
---|---|
react hooks useState array push, pop, 배열 값 추가, 값 삭제 (0) | 2022.05.10 |
setState 호출 직후 상태가 바로 업데이트 되지 않는 이슈 (0) | 2022.01.31 |
too many re-renders. react limits the number of renders to prevent an infinite loop 에러 해결 (0) | 2021.01.05 |
React TIL - 값 수정 할 때 주의점 (0) | 2020.12.18 |
Comments