Conversation
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.
할 일 예제에서 목록 행이 있으면
registerRowRef등록이 부모 상태 업데이트를 반복하는 문제를 수정합니다.App이 렌더링할 때마다 새로운 콜백을 만들고,TodoListGroup의 effect는 그 콜백을 의존성으로 사용합니다. effect가 다시 행을 등록하면 새로운rowRefs객체가 생성되어 같은 과정이 반복됩니다.registerRowRef를useCallback으로 고정했습니다. 행의 인덱스가 바뀔 때는 기존 effect의index의존성으로 다시 등록되므로, 앞에 새 목록을 추가한 뒤 기존 목록을 여는 동작도 유지됩니다.재현 및 검증
18cc38e78a968712c357bacdc3c79fead5bfc6b4, Windows, Node.js 22.17.0, pnpm 10.24.0, React 19.1.1.pnpm dev실행 후/tests/todo-render.html을 열면 실제App에 목록 하나를 제공하는 회귀 검사가 실행됩니다. API 호출이나 ChatGPT 호스트는 필요하지 않습니다.pnpm tsc:app및pnpm build -- --target todo통과. JSX 컴포넌트는 실제 브라우저 실행과 Vite 빌드로 검증했습니다.기존 Vite·React만 사용하며 별도 테스트 의존성은 추가하지 않았습니다. ChatGPT 내부 통합 테스트를 실행한 것은 아닙니다.