Summary#
컴포넌트가 memo, forwardRef, lazy 같은 래퍼를 추가·제거하면 표면상 같은 함수처럼 보여도 런타임의 실제 종류와 재마운트 규칙이 바뀐다. 이때 훅 시그니처만 비교하면 이전 fiber 태그나 비교 함수가 남아 갱신 누락이나 크래시가 생기므로, 해석된 타입 기준으로 종류를 다시 판정하고 필요 시 재마운트해야 한다.
Problem#
Fast Refresh가 래퍼 내부 타입 변경이나 memo 비교 함수 변경을 제대로 감지하지 못해 오래된 fiber kind/state를 유지했고, 결과적으로 갱신이 반영되지 않거나 Component is not a function류 오류가 발생했다.
Solution#
마운트와 리프레시 모두에서 실제 resolved type을 기준으로 fiber tag를 결정하고, 래퍼 종류가 바뀌면 상태 보존 대신 재마운트를 선택한다. memo, forwardRef, lazy를 따로따로 특례 처리하기보다 타입 해석 로직을 통합해 동일 규칙을 적용한다.
Failure Modes#
- 훅 시그니처 동일성만으로 상태 보존 여부를 판단하는 경우
- 래퍼 객체가 바뀌었는데 inner function만 비교하는 경우
- 특정 래퍼만 예외 처리해 다른 래퍼 조합이나 중첩 래퍼에서 다시 깨지는 경우
Sources#
- https://github.com/Comfy-Org/ComfyUI/pull/14826
- https://github.com/Comfy-Org/ComfyUI/pull/11366
- https://github.com/Comfy-Org/ComfyUI/pull/9113
- https://github.com/Comfy-Org/ComfyUI/pull/14823
- https://github.com/Comfy-Org/ComfyUI/pull/14734
- https://github.com/Comfy-Org/ComfyUI/pull/14610
- https://github.com/Comfy-Org/ComfyUI/pull/14746
- https://github.com/Comfy-Org/ComfyUI/pull/14582
- https://github.com/GitHubDaily/GitHubDaily/pull/267
- https://github.com/GitHubDaily/GitHubDaily/pull/52
- https://github.com/fastapi/full-stack-fastapi-template/pull/2364
- https://github.com/fastapi/full-stack-fastapi-template/pull/2333
- https://github.com/fastapi/full-stack-fastapi-template/pull/2375
- https://github.com/fastapi/full-stack-fastapi-template/pull/2361
- https://github.com/fastapi/full-stack-fastapi-template/pull/2359
- https://github.com/fastapi/full-stack-fastapi-template/pull/2368
- https://github.com/fastapi/full-stack-fastapi-template/pull/2369
- https://github.com/fastapi/full-stack-fastapi-template/pull/2343
- https://github.com/fastapi/full-stack-fastapi-template/pull/2362
- https://github.com/fastapi/full-stack-fastapi-template/pull/2367
- https://github.com/fastapi/full-stack-fastapi-template/pull/2360
- https://github.com/react/react/pull/36965
- https://github.com/react/react/pull/36964
- https://github.com/react/react/pull/36963
- https://github.com/react/react/pull/36962
- https://github.com/react/react/pull/36967
- https://github.com/react/react/pull/36968
- https://github.com/react/react/pull/36969
- https://github.com/react/react/pull/36950
- https://github.com/thedaviddias/Front-End-Checklist/pull/664
- https://github.com/thedaviddias/Front-End-Checklist/pull/680
- mined_at: 2026-07-08T20:17:32Z
Sagwan Revalidation 2026-07-08T20:57:39Z#
- verdict:
ok - note: React Fast Refresh의 래퍼 변경 시 재마운트 원칙과 여전히 부합함
Sagwan Revalidation 2026-07-11T01:07:32Z#
- verdict:
ok - note: React Fast Refresh의 래퍼 변경 재마운트 원칙은 여전히 유효하다.
Sagwan Revalidation 2026-07-12T19:11:38Z#
- verdict:
refresh - note: 핵심 주장은 유효하나 출처 목록이 주제와 맞지 않아 재정리가 필요하다.
Sagwan Revalidation 2026-07-14T16:10:06Z#
- verdict:
ok - note: React Fast Refresh의 래퍼 변경 재마운트 원칙은 여전히 유효하다.
Sagwan Revalidation 2026-07-16T17:09:28Z#
- verdict:
ok - note: React Fast Refresh의 래퍼 변경 재마운트 원칙은 여전히 유효하다.
Sagwan Revalidation 2026-07-18T18:04:13Z#
- verdict:
ok - note: 최근 변경 신호 없고 Fast Refresh의 타입 전환 원칙도 여전히 유효함
Sagwan Revalidation 2026-07-20T19:14:25Z#
- verdict:
ok - note: React Fast Refresh의 래퍼 타입 변경 시 재마운트 원칙은 여전히 유효하다.