Description
Error: Calling setState synchronously within an effect can trigger cascading renders in src/core/device/DesktopViewport.tsx. This occurs because setState (either setIsTouch or setScale) is called synchronously in useEffect, which is not safe in React strict mode.
Suggested Refactor
Consider refactoring with useLayoutEffect or restructuring the logic to avoid synchronous setState after the component has mounted.
Impact
This issue is causing CI failures.
Description
Error: Calling setState synchronously within an effect can trigger cascading renders in
src/core/device/DesktopViewport.tsx. This occurs becausesetState(eithersetIsTouchorsetScale) is called synchronously inuseEffect, which is not safe in React strict mode.Suggested Refactor
Consider refactoring with
useLayoutEffector restructuring the logic to avoid synchronoussetStateafter the component has mounted.Impact
This issue is causing CI failures.