Skip to Content
풀스택 서버리스: 리액트, AWS, 그래프QL을 이용한 최신 애플리케이션 개발
book

풀스택 서버리스: 리액트, AWS, 그래프QL을 이용한 최신 애플리케이션 개발

by 김범준, 네이더 다빗
July 2021
Beginner to intermediate
216 pages
4h 26m
Korean
Hanbit Media, Inc.
Content preview from 풀스택 서버리스: 리액트, AWS, 그래프QL을 이용한 최신 애플리케이션 개발
109
5
사용자 정의 인증 전략
5.2.8
renderForm
함수
이제 양식 컴포넌트, 양식 상태 설정, 인증 함수가 모두 준비되었으니 현재 양식을 렌더링하는
renderForm
함수를 작성하겠습니다.
Form
.
js
에서
renderForm
함수를 다음과 같이 수정하겠
습니다.
function renderForm() {
switch(formType) {
case 'signUp':
return (
<SignUp
signUp={() => signUp(formState, updateFormType)}
updateFormState={e => updateForm(e)}
/>
)
case 'confirmSignUp':
return (
<ConfirmSignUp
confirmSignUp={() => confirmSignUp(formState, updateFormType)}
updateFormState={e => updateForm(e)}
/>
)
case 'signIn':
return (
<SignIn
signIn={() => signIn(formState, props.setUser)}
updateFormState={e => updateForm(e)}
/>
)
case 'forgotPassword':
return (
<ForgotPassword
forgotPassword={() ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

실전 시계열 분석: 통계와 머신러닝을 활용한 예측 기법

실전 시계열 분석: 통계와 머신러닝을 활용한 예측 기법

박찬성, 에일린 닐슨

Publisher Resources

ISBN: 9791162244487