[React] useEffectEvent
·
개발
Error: Calling setState synchronously within an effect can trigger cascading renders문제 상황최근 Next 16(React 19) 환경에서 다음과 같은 에러를 처음 맞닥뜨렸다.Error: Calling setState synchronously within an effect can trigger cascading renders 해당 에러가 발생한 코드는 다음과 같다.function DynamicVirtualList({ items, estimatedItemHeight = 80,}: DynamicVirtualListProps) { const [itemHeights, setItemHeights] = useState(() => Array..