[7팀 강병준] Chapter 1-2. 프레임워크 없이 SPA 만들기 (2) #46
Open
BangDori wants to merge 22 commits into
Open
Conversation
- 가독성을 위해 조건문을 분리 - nullish 연산자를 활용해 nullish props 값 null 처리 - JSX children 중첩 단계를 고려하여 Infinity로 평탄화
1. nullish 값과 boolean 처리 2. 문자열, 숫자 처리 3. 함수형 컴포넌트 전달 시, 함수 호출 후 재귀적으로 표준화 4. 객체일 경우, 자식 요소들을 재귀적으로 표준화하고 nullish 처리
- null, undefined, boolean 처리 - 문자열, 숫자 처리 - 배열인 경우 재귀 호출로 처리 - 그 외 DOM 생성 후 처리
- 이벤트의 타입은 eventTypes에서 관리 - 이벤트가 등록되는 요소와 함수는 eventMap에서 관리
- 이벤트 타입을 순회하며 정의된 이벤트 타입들을 인자로 받은 요소에 등록
- target이 현재 등록된 타겟이 아닌 경우, 이벤트를 상위로 전파하도록 수정
- vNode 표준화 이후 container에 vNode 추가 - 최초 렌더링 시점에만 이벤트 등록
- 이벤트 처리 제거 로직을 setupEventListeners에 추가하여 동적 이벤트 허용하도록 반영
- checked, selected, disabled 속성 매핑
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
과제 체크포인트
배포 링크
https://hanghae-plus.github.io/front_6th_chapter1-2/
기본과제
가상돔을 기반으로 렌더링하기
이벤트 위임
심화 과제
Diff 알고리즘 구현
과제 셀프회고
기술적 성장
String()과toString()의 차이가 궁금해서 찾아보았는데, nullish 처리 가능 여부라는 사실을 알게 되었고 새롭게 알게된 정보를 다른 분들께도 공유하였는데 정말 많은 분들이 호응해주셔서 기분이 좋았다. (다들 너무 착하신 것 같다.)코드 품질
학습 효과 분석
과제 피드백
리뷰 받고 싶은 내용