Skip to content

React Review Audit #10

Description

@react-doctor
2 errors, ⚠️ 243 warnings 66 score
Copy as prompt
Fix the following React Review diagnostics in my codebase.

## Errors (2)

1. [error] effect-needs-cleanup — src/app/page.tsx:124
   useEffect subscribes via `subscribe(...)` but never returns a cleanup — leaks the registration on every re-run and on unmount. Return a cleanup function that calls the matching remove/unsubscribe call

2. [error] effect-needs-cleanup — src/once-ui/components/Dialog.tsx:90
   useEffect schedules `setTimeout(...)` but never returns a cleanup — leaks the registration on every re-run and on unmount. Return a cleanup function that calls clearTimeout(...)

## Warnings (243)

3. [warning] no-react19-deprecated-apis — src/once-ui/components/Tag.tsx:3
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

4. [warning] no-barrel-import — src/once-ui/components/Tag.tsx:6
   Import from barrel/index file — import directly from source modules: "./Flex", "./Text", "./Icon"

5. [warning] no-react19-deprecated-apis — src/once-ui/components/StatusIndicator.tsx:3
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

6. [warning] no-react19-deprecated-apis — src/once-ui/components/RevealFx.tsx:3
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

7. [warning] no-barrel-import — src/once-ui/components/RevealFx.tsx:6
   Import from barrel/index file — import directly from "./Flex" for better tree-shaking

8. [warning] no-derived-useState — src/once-ui/components/RevealFx.tsx:34
   useState initialized from prop "revealedByDefault" — if this value should stay in sync with the prop, derive it during render instead

9. [warning] server-fetch-without-revalidate — src/app/api/agent_rating/route.ts:35
   fetch(url) in a Server Component / route handler defaults to forever-caching — pass { next: { revalidate: <seconds> } } / { next: { tags: [...] } } / { cache: "no-store" } so stale data doesn't quietly persist

10. [warning] no-react19-deprecated-apis — src/once-ui/components/ThemeProvider.tsx:3
   useContext is superseded by `use()` on React 19+ — `use()` reads context conditionally inside hooks, branches, and loops; switch to `import { use } from 'react'`

11. [warning] no-effect-chain — src/once-ui/components/ThemeProvider.tsx:41
   useEffect reacts to "theme" which is set by another useEffect — chains of effects add an extra render per link and become rigid as code evolves. Compute what you can during render and write all related state inside the event handler that originally fires the chain

12. [warning] rerender-state-only-in-handlers — src/once-ui/components/ThemeProvider.tsx:29
   useState "mounted" is updated but never read in the component's return — use useRef so updates don't trigger re-renders

13. [warning] no-unknown-property — src/once-ui/components/Table.tsx:108
   Unknown property found

14. [warning] js-tosorted-immutable — src/once-ui/components/Table.tsx:35
   [...array].sort() — use array.toSorted() for immutable sorting (ES2023)

15. [warning] no-array-index-as-key — src/once-ui/components/Table.tsx:55
   Array index "index" used as key — causes bugs when list is reordered or filtered

16. [warning] no-array-index-as-key — src/once-ui/components/Table.tsx:85
   Array index "index" used as key — causes bugs when list is reordered or filtered

17. [warning] no-barrel-import — src/once-ui/components/SegmentedControl.tsx:4
   Import from barrel/index file — import directly from source modules: "./ToggleButton", "./Scroller", "./Flex"

18. [warning] no-react19-deprecated-apis — src/once-ui/components/ToastProvider.tsx:3
   useContext is superseded by `use()` on React 19+ — `use()` reads context conditionally inside hooks, branches, and loops; switch to `import { use } from 'react'`

19. [warning] no-react19-deprecated-apis — src/once-ui/components/Textarea.tsx:6
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

20. [warning] no-barrel-import — src/once-ui/components/Textarea.tsx:12
   Import from barrel/index file — import directly from source modules: "./Flex", "./Text"

21. [warning] js-batch-dom-css — src/once-ui/components/Textarea.tsx:76
   Multiple sequential element.style assignments — batch with cssText or classList for fewer reflows

22. [warning] no-generic-handler-names — src/once-ui/components/Textarea.tsx:191
   Non-descriptive handler name "handleFocus" — name should describe what it does, not when it runs

23. [warning] no-generic-handler-names — src/once-ui/components/Textarea.tsx:192
   Non-descriptive handler name "handleBlur" — name should describe what it does, not when it runs

24. [warning] no-generic-handler-names — src/once-ui/components/Textarea.tsx:201
   Non-descriptive handler name "handleChange" — name should describe what it does, not when it runs

25. [warning] no-react19-deprecated-apis — src/once-ui/components/SmartLink.tsx:3
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

26. [warning] no-barrel-import — src/once-ui/components/SmartLink.tsx:5
   Import from barrel/index file — import directly from "./Icon" for better tree-shaking

27. [warning] no-react19-deprecated-apis — src/once-ui/components/User.tsx:3
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

28. [warning] no-barrel-import — src/once-ui/components/User.tsx:6
   Import from barrel/index file — import directly from source modules: "./Flex", "./Text", "./Skeleton", "./Tag", "./Avatar"

29. [warning] no-react19-deprecated-apis — src/once-ui/components/Toast.tsx:3
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

30. [warning] no-barrel-import — src/once-ui/components/Toast.tsx:4
   Import from barrel/index file — import directly from source modules: "./IconButton", "./Icon", "./Flex", "./Text"

31. [warning] no-prop-callback-in-effect — src/once-ui/components/Toast.tsx:34
   useEffect calls prop callback "onClose" with local state in deps — this is the "lift state via callback" anti-pattern; lift state into a shared Provider so both sides read the same source

32. [warning] no-react19-deprecated-apis — src/once-ui/components/StylePanel.tsx:3
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

33. [warning] no-barrel-import — src/once-ui/components/StylePanel.tsx:4
   Import from barrel/index file — import directly from source modules: "./Flex", "./Text", "./SegmentedControl", "./IconButton", "./Scroller", "./Column"

34. [warning] no-barrel-import — src/once-ui/components/Arrow.tsx:6
   Import from barrel/index file — import directly from "./Flex" for better tree-shaking

35. [warning] no-react19-deprecated-apis — src/once-ui/components/IconButton.tsx:3
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

36. [warning] no-barrel-import — src/once-ui/components/IconButton.tsx:5
   Import from barrel/index file — import directly from source modules: "./Flex", "./Icon", "./Tooltip"

37. [warning] no-cascading-set-state — src/once-ui/components/IconButton.tsx:59
   3 setState calls in a single useEffect — consider using useReducer or deriving state

38. [warning] no-react19-deprecated-apis — src/once-ui/components/Tooltip.tsx:3
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

39. [warning] no-barrel-import — src/once-ui/components/Tooltip.tsx:6
   Import from barrel/index file — import directly from source modules: "./Flex", "./Icon"

40. [warning] no-react19-deprecated-apis — src/once-ui/components/TagInput.tsx:8
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

41. [warning] no-barrel-import — src/once-ui/components/TagInput.tsx:11
   Import from barrel/index file — import directly from source modules: "./Flex", "./Chip", "./Input"

42. [warning] no-generic-handler-names — src/once-ui/components/TagInput.tsx:59
   Non-descriptive handler name "handleFocus" — name should describe what it does, not when it runs

43. [warning] no-generic-handler-names — src/once-ui/components/TagInput.tsx:60
   Non-descriptive handler name "handleBlur" — name should describe what it does, not when it runs

44. [warning] no-array-index-as-key — src/once-ui/components/TagInput.tsx:78
   Array index "index" used as key — causes bugs when list is reordered or filtered

45. [warning] no-react19-deprecated-apis — src/once-ui/components/Badge.tsx:3
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

46. [warning] no-barrel-import — src/once-ui/components/Badge.tsx:4
   Import from barrel/index file — import directly from source modules: "./Arrow", "./Flex", "./Icon", "./SmartLink", "./Text"

47. [warning] js-combine-iterations — src/once-ui/hooks/generateHeadingLinks.ts:7
   .filter().map() iterates the array twice — combine into a single loop with .reduce() or for...of

48. [warning] no-react19-deprecated-apis — src/once-ui/components/ThemeSwitcher.tsx:3
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

49. [warning] no-react19-deprecated-apis — src/once-ui/components/Background.tsx:3
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

50. [warning] no-derived-state-effect — src/once-ui/components/Background.tsx:94
   Derived state in useEffect — compute during render instead

51. [warning] server-fetch-without-revalidate — src/app/api/gemini/route.ts:37
   fetch(url) in a Server Component / route handler defaults to forever-caching — pass { next: { revalidate: <seconds> } } / { next: { tags: [...] } } / { cache: "no-store" } so stale data doesn't quietly persist

52. [warning] no-barrel-import — src/once-ui/modules/code/CodeBlock.tsx:9
   Import from barrel/index file — import directly from source modules: "../../components/Flex", "../../components/Button", "../../components/IconButton", "../../components/Scroller", "../../components/Row", "../../components/StyleOverlay"

53. [warning] rerender-memo-with-default-value — src/once-ui/modules/code/CodeBlock.tsx:50
   Default prop value [] creates a new array reference every render — extract to a module-level constant

54. [warning] no-array-index-as-key — src/once-ui/modules/code/CodeBlock.tsx:155
   Array index "index" used as key — causes bugs when list is reordered or filtered

55. [warning] no-array-index-as-key — src/once-ui/modules/code/CodeBlock.tsx:234
   Array index "index" used as key — causes bugs when list is reordered or filtered

56. [warning] no-barrel-import — src/once-ui/components/Toaster.tsx:5
   Import from barrel/index file — import directly from source modules: "./Flex", "./Toast"

57. [warning] no-barrel-import — src/once-ui/components/Carousel.tsx:3
   Import from barrel/index file — import directly from source modules: "./Flex", "./RevealFx", "./Scroller", "./SmartImage"

58. [warning] rerender-memo-with-default-value — src/once-ui/components/Carousel.tsx:20
   Default prop value [] creates a new array reference every render — extract to a module-level constant

59. [warning] rerender-state-only-in-handlers — src/once-ui/components/Carousel.tsx:29
   useState "initialTransition" is updated but never read in the component's return — use useRef so updates don't trigger re-renders

60. [warning] no-derived-useState — src/once-ui/components/Carousel.tsx:28
   useState initialized from prop "revealedByDefault" — if this value should stay in sync with the prop, derive it during render instead

61. [warning] no-derived-useState — src/once-ui/components/Carousel.tsx:29
   useState initialized from prop "revealedByDefault" — if this value should stay in sync with the prop, derive it during render instead

62. [warning] no-array-index-as-key — src/once-ui/components/Carousel.tsx:111
   Array index "index" used as key — causes bugs when list is reordered or filtered

63. [warning] no-array-index-as-key — src/once-ui/components/Carousel.tsx:130
   Array index "index" used as key — causes bugs when list is reordered or filtered

64. [warning] no-danger — src/app/layout.tsx:111
   Do not use `dangerouslySetInnerHTML` prop

65. [warning] nextjs-no-css-link — src/app/layout.tsx:105
   <link rel="stylesheet"> tag — import CSS directly for bundling and optimization

66. [warning] nextjs-no-native-script — src/app/layout.tsx:109
   Use next/script <Script> instead of <script> — provides loading strategy optimization and deferred loading

67. [warning] no-barrel-import — src/once-ui/components/UserMenu.tsx:5
   Import from barrel/index file — import directly from source modules: "./Flex", "./DropdownWrapper", "./User"

68. [warning] no-react19-deprecated-apis — src/once-ui/components/Spinner.tsx:1
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

69. [warning] no-react19-deprecated-apis — src/once-ui/components/Avatar.tsx:3
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

70. [warning] no-barrel-import — src/once-ui/components/Avatar.tsx:5
   Import from barrel/index file — import directly from source modules: "./Skeleton", "./Icon", "./Text", "./StatusIndicator", "./Flex", "./SmartImage"

71. [warning] no-render-in-render — src/once-ui/components/Avatar.tsx:130
   Inline render function "renderContent()" — extract to a separate component for proper reconciliation

72. [warning] no-unknown-property — src/app/page.tsx:854
   Unknown property found

73. [warning] no-unknown-property — src/app/page.tsx:1230
   Unknown property found

74. [warning] anchor-is-valid — src/app/page.tsx:767
   Missing `href` attribute for the `a` element.

75. [warning] nextjs-missing-metadata — src/app/page.tsx:1
   Page without metadata or generateMetadata export — hurts SEO

76. [warning] no-giant-component — src/app/page.tsx:48
   Component "Home" is 1490 lines — consider breaking it into smaller focused components

77. [warning] prefer-useReducer — src/app/page.tsx:48
   Component "Home" has 12 useState calls — consider useReducer for related state

78. [warning] rendering-usetransition-loading — src/app/page.tsx:54
   useState for "isLoading" — if this guards a state transition (not an async fetch), consider useTransition instead

79. [warning] no-inline-exhaustive-style — src/app/page.tsx:573
   11 inline style properties — extract to a CSS class, CSS module, or styled component for maintainability and reuse

80. [warning] design-no-em-dash-in-jsx-text — src/app/page.tsx:786
   Em dash (—) in JSX text reads as model output — replace with comma, colon, semicolon, or parentheses

81. [warning] no-z-index-9999 — src/app/page.tsx:872
   z-index: 999999999 is arbitrarily high — use a deliberate z-index scale (1–50). Extreme values signal a stacking context problem, not a fix

82. [warning] no-generic-handler-names — src/app/page.tsx:1018
   Non-descriptive handler name "handleChange" — name should describe what it does, not when it runs

83. [warning] no-z-index-9999 — src/app/page.tsx:1206
   z-index: 999999999 is arbitrarily high — use a deliberate z-index scale (1–50). Extreme values signal a stacking context problem, not a fix

84. [warning] rerender-functional-setstate — src/app/page.tsx:1301
   setProject({ ...project, ... }) — use functional update `setProject(prev => ({ ...prev, ... }))` to avoid stale closures

85. [warning] rerender-functional-setstate — src/app/page.tsx:1317
   setProject({ ...project, ... }) — use functional update `setProject(prev => ({ ...prev, ... }))` to avoid stale closures

86. [warning] rerender-functional-setstate — src/app/page.tsx:1345
   setProject({ ...project, ... }) — use functional update `setProject(prev => ({ ...prev, ... }))` to avoid stale closures

87. [warning] rerender-functional-setstate — src/app/page.tsx:1354
   setProject({ ...project, ... }) — use functional update `setProject(prev => ({ ...prev, ... }))` to avoid stale closures

88. [warning] rerender-functional-setstate — src/app/page.tsx:1379
   setProject({ ...project, ... }) — use functional update `setProject(prev => ({ ...prev, ... }))` to avoid stale closures

89. [warning] rerender-functional-setstate — src/app/page.tsx:1436
   setProject({ ...project, ... }) — use functional update `setProject(prev => ({ ...prev, ... }))` to avoid stale closures

90. [warning] rerender-functional-setstate — src/app/page.tsx:1445
   setProject({ ...project, ... }) — use functional update `setProject(prev => ({ ...prev, ... }))` to avoid stale closures

91. [warning] rerender-functional-setstate — src/app/page.tsx:1472
   setProject({ ...project, ... }) — use functional update `setProject(prev => ({ ...prev, ... }))` to avoid stale closures

92. [warning] rerender-functional-setstate — src/app/page.tsx:1487
   setProject({ ...project, ... }) — use functional update `setProject(prev => ({ ...prev, ... }))` to avoid stale closures

93. [warning] rerender-functional-setstate — src/app/page.tsx:1512
   setProject({ ...project, ... }) — use functional update `setProject(prev => ({ ...prev, ... }))` to avoid stale closures

94. [warning] no-static-element-interactions — src/once-ui/components/Switch.tsx:87
   Static HTML elements with event handlers require a role.

95. [warning] no-react19-deprecated-apis — src/once-ui/components/Switch.tsx:3
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

96. [warning] no-barrel-import — src/once-ui/components/Switch.tsx:6
   Import from barrel/index file — import directly from source modules: "./Flex", "./InteractiveDetails", "./Spinner"

97. [warning] no-generic-handler-names — src/once-ui/components/Switch.tsx:64
   Non-descriptive handler name "handleClick" — name should describe what it does, not when it runs

98. [warning] no-react19-deprecated-apis — src/once-ui/components/Button.tsx:3
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

99. [warning] no-barrel-import — src/once-ui/components/Button.tsx:7
   Import from barrel/index file — import directly from source modules: "./Spinner", "./Icon", "./Arrow", "./Flex"

100. [warning] no-react19-deprecated-apis — src/once-ui/components/Accordion.tsx:3
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

101. [warning] no-barrel-import — src/once-ui/components/Accordion.tsx:4
   Import from barrel/index file — import directly from source modules: "./Flex", "./Icon", "./Text", "./Column", "./Grid"

102. [warning] no-mirror-prop-effect — src/once-ui/components/Accordion.tsx:39
   useState "isOpen" is mirrored from prop "open" via this effect — delete both the useState and the effect, and read the prop directly in render

103. [warning] no-derived-useState — src/once-ui/components/Accordion.tsx:37
   useState initialized from prop "open" — if this value should stay in sync with the prop, derive it during render instead

104. [warning] no-derived-state-effect — src/once-ui/components/Accordion.tsx:39
   Derived state in useEffect — compute during render instead

105. [warning] no-react19-deprecated-apis — src/once-ui/components/ElementType.tsx:2
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

106. [warning] no-react19-deprecated-apis — src/once-ui/components/Chip.tsx:3
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

107. [warning] no-barrel-import — src/once-ui/components/Chip.tsx:5
   Import from barrel/index file — import directly from source modules: "./Text", "./Icon", "./IconButton", "./Flex"

108. [warning] no-react19-deprecated-apis — src/once-ui/components/AvatarGroup.tsx:3
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

109. [warning] no-barrel-import — src/once-ui/components/AvatarGroup.tsx:5
   Import from barrel/index file — import directly from source modules: "./Avatar", "./Flex"

110. [warning] no-array-index-as-key — src/once-ui/components/AvatarGroup.tsx:34
   Array index "index" used as key — causes bugs when list is reordered or filtered

111. [warning] no-barrel-import — src/once-ui/components/TiltFx.tsx:5
   Import from barrel/index file — import directly from "./Flex" for better tree-shaking

112. [warning] no-react19-deprecated-apis — src/once-ui/components/GlitchFx.tsx:3
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

113. [warning] no-barrel-import — src/once-ui/components/DateInput.tsx:4
   Import from barrel/index file — import directly from source modules: "./Input", "./DropdownWrapper", "./Flex", "./DatePicker"

114. [warning] no-react19-deprecated-apis — src/once-ui/components/Card.tsx:3
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

115. [warning] no-barrel-import — src/once-ui/components/Card.tsx:4
   Import from barrel/index file — import directly from "./Flex" for better tree-shaking

116. [warning] no-react19-deprecated-apis — src/once-ui/components/ToggleButton.tsx:3
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

117. [warning] no-barrel-import — src/once-ui/components/ToggleButton.tsx:6
   Import from barrel/index file — import directly from source modules: "./Flex", "./Icon"

118. [warning] no-react19-deprecated-apis — src/once-ui/components/HeadingNav.tsx:3
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

119. [warning] js-flatmap-filter — src/once-ui/components/HeadingNav.tsx:43
   .map().filter(Boolean) iterates twice — use .flatMap() to transform and filter in a single pass

120. [warning] no-react19-deprecated-apis — src/once-ui/components/Dialog.tsx:8
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

121. [warning] no-react19-deprecated-apis — src/once-ui/components/Dialog.tsx:10
   useContext is superseded by `use()` on React 19+ — `use()` reads context conditionally inside hooks, branches, and loops; switch to `import { use } from 'react'`

122. [warning] no-barrel-import — src/once-ui/components/Dialog.tsx:14
   Import from barrel/index file — import directly from source modules: "./Flex", "./Heading", "./IconButton", "./Text"

123. [warning] prefer-use-effect-event — src/once-ui/components/Dialog.tsx:205
   "onClose" is read only inside `addEventListener` — wrap it with useEffectEvent and remove it from the dep array so the effect doesn't re-synchronize on every parent render

124. [warning] no-derived-useState — src/once-ui/components/Dialog.tsx:73
   useState initialized from prop "isOpen" — if this value should stay in sync with the prop, derive it during render instead

125. [warning] no-prop-callback-in-effect — src/once-ui/components/Dialog.tsx:86
   useEffect calls prop callback "onHeightChange" with local state in deps — this is the "lift state via callback" anti-pattern; lift state into a shared Provider so both sides read the same source

126. [warning] no-cascading-set-state — src/once-ui/components/Dialog.tsx:90
   6 setState calls in a single useEffect — consider using useReducer or deriving state

127. [warning] advanced-event-handler-refs — src/once-ui/components/Dialog.tsx:131
   useEffect re-subscribes a "handleKeyDown" listener every time the handler identity changes — store the handler in a ref and have the listener read `handlerRef.current()`, then drop it from the deps

128. [warning] no-react19-deprecated-apis — src/once-ui/components/ColorInput.tsx:3
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

129. [warning] no-barrel-import — src/once-ui/components/ColorInput.tsx:4
   Import from barrel/index file — import directly from source modules: "./Flex", "./Input", "./IconButton", "./Icon"

130. [warning] no-react19-deprecated-apis — src/once-ui/components/InlineCode.tsx:3
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

131. [warning] no-react19-deprecated-apis — src/once-ui/components/Fade.tsx:3
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

132. [warning] no-barrel-import — src/once-ui/components/Fade.tsx:6
   Import from barrel/index file — import directly from "./Flex" for better tree-shaking

133. [warning] no-react19-deprecated-apis — src/once-ui/components/DatePicker.tsx:3
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

134. [warning] no-barrel-import — src/once-ui/components/DatePicker.tsx:5
   Import from barrel/index file — import directly from source modules: "./Flex", "./Text", "./Button", "./Grid", "./SegmentedControl", "./IconButton", "./RevealFx", "./NumberInput"

135. [warning] no-derived-useState — src/once-ui/components/DatePicker.tsx:59
   useState initialized from prop "value" — if this value should stay in sync with the prop, derive it during render instead

136. [warning] no-derived-useState — src/once-ui/components/DatePicker.tsx:60
   useState initialized from prop "defaultTime" — if this value should stay in sync with the prop, derive it during render instead

137. [warning] no-cascading-set-state — src/once-ui/components/DatePicker.tsx:87
   3 setState calls in a single useEffect — consider using useReducer or deriving state

138. [warning] rerender-functional-setstate — src/once-ui/components/DatePicker.tsx:153
   setCurrentYear(currentYear - ...) — use functional update to avoid stale closures

139. [warning] rerender-functional-setstate — src/once-ui/components/DatePicker.tsx:156
   setCurrentYear(currentYear + ...) — use functional update to avoid stale closures

140. [warning] no-array-index-as-key — src/once-ui/components/DatePicker.tsx:211
   Array index "i" used as key — causes bugs when list is reordered or filtered

141. [warning] no-array-index-as-key — src/once-ui/components/DatePicker.tsx:274
   Array index "i" used as key — causes bugs when list is reordered or filtered

142. [warning] no-render-in-render — src/once-ui/components/DatePicker.tsx:435
   Inline render function "renderCalendarGrid()" — extract to a separate component for proper reconciliation

143. [warning] no-react19-deprecated-apis — src/once-ui/components/Kbd.tsx:3
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

144. [warning] no-barrel-import — src/once-ui/components/Kbd.tsx:5
   Import from barrel/index file — import directly from source modules: "./Flex", "./Text"

145. [warning] no-react19-deprecated-apis — src/once-ui/components/Grid.tsx:3
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

146. [warning] no-react19-deprecated-apis — src/once-ui/components/Dropdown.tsx:3
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

147. [warning] no-barrel-import — src/once-ui/components/Dropdown.tsx:4
   Import from barrel/index file — import directly from "./Flex" for better tree-shaking

148. [warning] no-react19-deprecated-apis — src/once-ui/modules/media/MediaUpload.tsx:3
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

149. [warning] no-barrel-import — src/once-ui/modules/media/MediaUpload.tsx:5
   Import from barrel/index file — import directly from source modules: "../../components/Flex", "../../components/Icon", "../../components/SmartImage", "../../components/Spinner", "../../components/Text"

150. [warning] no-derived-useState — src/once-ui/modules/media/MediaUpload.tsx:51
   useState initialized from prop "initialPreviewImage" — if this value should stay in sync with the prop, derive it during render instead

151. [warning] no-barrel-import — src/once-ui/components/CompareImage.tsx:4
   Import from barrel/index file — import directly from source modules: "./Flex", "./SmartImage", "./IconButton"

152. [warning] client-passive-event-listeners — src/once-ui/components/CompareImage.tsx:73
   "touchmove" listener without { passive: true } — blocks scrolling performance. Only add { passive: true } if the handler does NOT call event.preventDefault() (passive listeners silently ignore preventDefault())

153. [warning] client-passive-event-listeners — src/once-ui/components/CompareImage.tsx:74
   "touchend" listener without { passive: true } — blocks scrolling performance. Only add { passive: true } if the handler does NOT call event.preventDefault() (passive listeners silently ignore preventDefault())

154. [warning] no-render-in-render — src/once-ui/components/CompareImage.tsx:93
   Inline render function "renderContent()" — extract to a separate component for proper reconciliation

155. [warning] no-render-in-render — src/once-ui/components/CompareImage.tsx:94
   Inline render function "renderContent()" — extract to a separate component for proper reconciliation

156. [warning] no-react19-deprecated-apis — src/once-ui/components/Feedback.tsx:3
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

157. [warning] no-barrel-import — src/once-ui/components/Feedback.tsx:4
   Import from barrel/index file — import directly from source modules: "./IconButton", "./Button", "./Icon", "./Flex", "./Text"

158. [warning] no-barrel-import — src/once-ui/components/MegaMenu.tsx:5
   Import from barrel/index file — import directly from source modules: "./Flex", "./Row", "./Column", "./Text", "./Icon", "./ToggleButton"

159. [warning] no-cascading-set-state — src/once-ui/components/MegaMenu.tsx:45
   3 setState calls in a single useEffect — consider using useReducer or deriving state

160. [warning] no-derived-state-effect — src/once-ui/components/MegaMenu.tsx:88
   State reset in useEffect — use a key prop to reset component state when props change

161. [warning] no-array-index-as-key — src/once-ui/components/MegaMenu.tsx:111
   Array index "index" used as key — causes bugs when list is reordered or filtered

162. [warning] no-layout-transition-inline — src/once-ui/components/MegaMenu.tsx:159
   Transitioning layout property "width" causes layout thrash every frame — use transform and opacity instead

163. [warning] no-barrel-import — src/once-ui/components/DateRangePicker.tsx:4
   Import from barrel/index file — import directly from source modules: "./Flex", "./DatePicker"

164. [warning] rerender-lazy-state-init — src/once-ui/components/DateRangePicker.tsx:33
   useState(getMonth()) calls initializer on every render — use useState(() => getMonth()) for lazy initialization

165. [warning] rerender-lazy-state-init — src/once-ui/components/DateRangePicker.tsx:34
   useState(getFullYear()) calls initializer on every render — use useState(() => getFullYear()) for lazy initialization

166. [warning] no-barrel-import — src/once-ui/components/Option.tsx:2
   Import from barrel/index file — import directly from source modules: "./Flex", "./Text"

167. [warning] no-react19-deprecated-apis — src/once-ui/components/Option.tsx:5
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

168. [warning] no-react19-deprecated-apis — src/once-ui/components/Checkbox.tsx:3
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

169. [warning] no-barrel-import — src/once-ui/components/Checkbox.tsx:5
   Import from barrel/index file — import directly from source modules: "./Flex", "./Icon", "./InteractiveDetails"

170. [warning] rerender-lazy-state-init — src/once-ui/components/Checkbox.tsx:32
   useState(generateId()) calls initializer on every render — use useState(() => generateId()) for lazy initialization

171. [warning] no-react19-deprecated-apis — src/once-ui/components/Column.tsx:3
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

172. [warning] no-barrel-import — src/once-ui/components/Column.tsx:4
   Import from barrel/index file — import directly from "./Flex" for better tree-shaking

173. [warning] no-react19-deprecated-apis — src/once-ui/components/Icon.tsx:3
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

174. [warning] no-barrel-import — src/once-ui/components/Icon.tsx:8
   Import from barrel/index file — import directly from source modules: "./Flex", "./Tooltip"

175. [warning] no-cascading-set-state — src/once-ui/components/Icon.tsx:50
   3 setState calls in a single useEffect — consider using useReducer or deriving state

176. [warning] no-react19-deprecated-apis — src/once-ui/components/Row.tsx:3
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

177. [warning] no-barrel-import — src/once-ui/components/Row.tsx:4
   Import from barrel/index file — import directly from "./Flex" for better tree-shaking

178. [warning] no-barrel-import — src/once-ui/components/Kbar.tsx:11
   Import from barrel/index file — import directly from source modules: "./Flex", "./Text", "./Icon", "./Column", "./Input", "./Option", "./Row"

179. [warning] no-effect-chain — src/once-ui/components/Kbar.tsx:169
   useEffect reacts to "searchQuery" which is set by another useEffect — chains of effects add an extra render per link and become rigid as code evolves. Compute what you can during render and write all related state inside the event handler that originally fires the chain

180. [warning] no-giant-component — src/once-ui/components/Kbar.tsx:64
   Component "KbarContent" is 365 lines — consider breaking it into smaller focused components

181. [warning] prefer-use-effect-event — src/once-ui/components/Kbar.tsx:267
   "handleClose" is read only inside `addEventListener` — wrap it with useEffectEvent and remove it from the dep array so the effect doesn't re-synchronize on every parent render

182. [warning] no-array-index-as-key — src/once-ui/components/Kbar.tsx:134
   Array index "i" used as key — causes bugs when list is reordered or filtered

183. [warning] react-compiler-destructure-method — src/once-ui/components/Kbar.tsx:210
   Destructure for clarity: `const { push } = useRouter()` then call `push(...)` directly — easier for React Compiler to memoize and clearer about which methods this component depends on

184. [warning] no-cascading-set-state — src/once-ui/components/Kbar.tsx:286
   3 setState calls in a single useEffect — consider using useReducer or deriving state

185. [warning] no-barrel-import — src/once-ui/components/DateRangeInput.tsx:4
   Import from barrel/index file — import directly from source modules: "./Input", "./DropdownWrapper", "./Flex", "./DateRangePicker", "./Row"

186. [warning] click-events-have-key-events — src/once-ui/components/InteractiveDetails.tsx:26
   Enforce a clickable non-interactive element has at least one keyboard event listener.

187. [warning] no-static-element-interactions — src/once-ui/components/InteractiveDetails.tsx:26
   Static HTML elements with event handlers require a role.

188. [warning] no-react19-deprecated-apis — src/once-ui/components/InteractiveDetails.tsx:3
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

189. [warning] no-barrel-import — src/once-ui/components/InteractiveDetails.tsx:4
   Import from barrel/index file — import directly from source modules: "./Text", "./Flex", "./IconButton"

190. [warning] no-react19-deprecated-apis — src/once-ui/components/Select.tsx:3
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

191. [warning] no-barrel-import — src/once-ui/components/Select.tsx:5
   Import from barrel/index file — import directly from source modules: "./DropdownWrapper", "./Flex", "./Icon", "./IconButton", "./Input", "./Option"

192. [warning] no-generic-handler-names — src/once-ui/components/Select.tsx:172
   Non-descriptive handler name "handleFocus" — name should describe what it does, not when it runs

193. [warning] no-generic-handler-names — src/once-ui/components/Select.tsx:216
   Non-descriptive handler name "handleBlur" — name should describe what it does, not when it runs

194. [warning] js-combine-iterations — src/once-ui/components/Select.tsx:221
   .filter().map() iterates the array twice — combine into a single loop with .reduce() or for...of

195. [warning] no-barrel-import — src/once-ui/components/Logo.tsx:8
   Import from barrel/index file — import directly from "./Flex" for better tree-shaking

196. [warning] nextjs-no-img-element — src/once-ui/components/Logo.tsx:60
   Use next/image instead of <img> — provides automatic optimization, lazy loading, and responsive srcset

197. [warning] nextjs-no-img-element — src/once-ui/components/Logo.tsx:79
   Use next/image instead of <img> — provides automatic optimization, lazy loading, and responsive srcset

198. [warning] no-react19-deprecated-apis — src/once-ui/components/DropdownWrapper.tsx:8
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

199. [warning] no-barrel-import — src/once-ui/components/DropdownWrapper.tsx:21
   Import from barrel/index file — import directly from source modules: "./Flex", "./Dropdown"

200. [warning] advanced-event-handler-refs — src/once-ui/components/DropdownWrapper.tsx:144
   useEffect re-subscribes a "handleClickOutside" listener every time the handler identity changes — store the handler in a ref and have the listener read `handlerRef.current()`, then drop it from the deps

201. [warning] no-react19-deprecated-apis — src/once-ui/components/Line.tsx:3
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

202. [warning] no-barrel-import — src/once-ui/components/Line.tsx:4
   Import from barrel/index file — import directly from "./Flex" for better tree-shaking

203. [warning] no-react19-deprecated-apis — src/once-ui/components/Input.tsx:6
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

204. [warning] no-barrel-import — src/once-ui/components/Input.tsx:12
   Import from barrel/index file — import directly from source modules: "./Flex", "./Text"

205. [warning] no-generic-handler-names — src/once-ui/components/Input.tsx:161
   Non-descriptive handler name "handleFocus" — name should describe what it does, not when it runs

206. [warning] no-generic-handler-names — src/once-ui/components/Input.tsx:162
   Non-descriptive handler name "handleBlur" — name should describe what it does, not when it runs

207. [warning] no-react19-deprecated-apis — src/once-ui/components/NumberInput.tsx:3
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

208. [warning] no-barrel-import — src/once-ui/components/NumberInput.tsx:4
   Import from barrel/index file — import directly from "./Input" for better tree-shaking

209. [warning] no-generic-handler-names — src/once-ui/components/NumberInput.tsx:68
   Non-descriptive handler name "handleChange" — name should describe what it does, not when it runs

210. [warning] no-react19-deprecated-apis — src/once-ui/components/Flex.tsx:4
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

211. [warning] no-react19-deprecated-apis — src/once-ui/components/NavIcon.tsx:1
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

212. [warning] no-barrel-import — src/once-ui/components/NavIcon.tsx:3
   Import from barrel/index file — import directly from "./Flex" for better tree-shaking

213. [warning] no-react19-deprecated-apis — src/once-ui/components/LetterFx.tsx:3
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

214. [warning] async-await-in-loop — src/once-ui/components/LetterFx.tsx:58
   await inside a while-loop runs the calls sequentially — for independent operations, collect them and use `await Promise.all(items.map(...))` to run them concurrently

215. [warning] async-await-in-loop — src/once-ui/components/LetterFx.tsx:63
   await inside a for-loop runs the calls sequentially — for independent operations, collect them and use `await Promise.all(items.map(...))` to run them concurrently

216. [warning] no-polymorphic-children — src/once-ui/components/LetterFx.tsx:97
   Polymorphic `typeof children === "string"` check — expose explicit subcomponents (e.g. `<Button.Text>`) instead of branching on what the consumer passed

217. [warning] no-polymorphic-children — src/once-ui/components/LetterFx.tsx:100
   Polymorphic `typeof children === "string"` check — expose explicit subcomponents (e.g. `<Button.Text>`) instead of branching on what the consumer passed

218. [warning] no-polymorphic-children — src/once-ui/components/LetterFx.tsx:115
   Polymorphic `typeof children === "string"` check — expose explicit subcomponents (e.g. `<Button.Text>`) instead of branching on what the consumer passed

219. [warning] no-prop-callback-in-effect — src/once-ui/components/LetterFx.tsx:127
   useEffect calls prop callback "onTrigger" with local state in deps — this is the "lift state via callback" anti-pattern; lift state into a shared Provider so both sides read the same source

220. [warning] no-react19-deprecated-apis — src/once-ui/components/RadioButton.tsx:3
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

221. [warning] no-barrel-import — src/once-ui/components/RadioButton.tsx:5
   Import from barrel/index file — import directly from source modules: "./Flex", "./InteractiveDetails"

222. [warning] rerender-lazy-state-init — src/once-ui/components/RadioButton.tsx:28
   useState(generateId()) calls initializer on every render — use useState(() => generateId()) for lazy initialization

223. [warning] no-react19-deprecated-apis — src/once-ui/components/PasswordInput.tsx:3
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

224. [warning] no-barrel-import — src/once-ui/components/PasswordInput.tsx:4
   Import from barrel/index file — import directly from source modules: "./Input", "./IconButton"

225. [warning] no-barrel-import — src/once-ui/components/HoloFx.tsx:5
   Import from barrel/index file — import directly from "./Flex" for better tree-shaking

226. [warning] no-barrel-import — src/once-ui/components/Scroller.tsx:5
   Import from barrel/index file — import directly from source modules: "./Flex", "./IconButton"

227. [warning] client-passive-event-listeners — src/once-ui/components/Scroller.tsx:53
   "scroll" listener without { passive: true } — blocks scrolling performance. Only add { passive: true } if the handler does NOT call event.preventDefault() (passive listeners silently ignore preventDefault())

228. [warning] client-passive-event-listeners — src/once-ui/components/ScrollToTop.tsx:30
   "scroll" listener without { passive: true } — blocks scrolling performance. Only add { passive: true } if the handler does NOT call event.preventDefault() (passive listeners silently ignore preventDefault())

229. [warning] no-react19-deprecated-apis — src/once-ui/components/LogoCloud.tsx:3
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

230. [warning] no-cascading-set-state — src/once-ui/components/LogoCloud.tsx:29
   4 setState calls in a single useEffect — consider using useReducer or deriving state

231. [warning] no-array-index-as-key — src/once-ui/components/LogoCloud.tsx:59
   Array index "index" used as key — causes bugs when list is reordered or filtered

232. [warning] iframe-has-title — src/once-ui/components/SmartImage.tsx:150
   Missing `title` attribute for the `iframe` element.

233. [warning] no-barrel-import — src/once-ui/components/SmartImage.tsx:6
   Import from barrel/index file — import directly from source modules: "./Flex", "./Skeleton"

234. [warning] no-outline-none — src/once-ui/components/SmartImage.tsx:124
   outline: none removes keyboard focus visibility — use :focus-visible styling instead, or provide a box-shadow focus ring

235. [warning] no-generic-handler-names — src/once-ui/components/SmartImage.tsx:131
   Non-descriptive handler name "handleClick" — name should describe what it does, not when it runs

236. [warning] no-generic-handler-names — src/once-ui/components/SmartImage.tsx:184
   Non-descriptive handler name "handleClick" — name should describe what it does, not when it runs

237. [warning] no-array-index-as-key — src/once-ui/components/AccordionGroup.tsx:22
   Array index "index" used as key — causes bugs when list is reordered or filtered

238. [warning] no-react19-deprecated-apis — src/once-ui/components/Skeleton.tsx:3
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

239. [warning] no-react19-deprecated-apis — src/once-ui/components/OTPInput.tsx:3
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

240. [warning] no-barrel-import — src/once-ui/components/OTPInput.tsx:4
   Import from barrel/index file — import directly from source modules: "./Flex", "./Input", "./Text"

241. [warning] rerender-lazy-state-init — src/once-ui/components/OTPInput.tsx:29
   useState(fill()) calls initializer on every render — use useState(() => fill()) for lazy initialization

242. [warning] no-array-index-as-key — src/once-ui/components/OTPInput.tsx:103
   Array index "index" used as key — causes bugs when list is reordered or filtered

243. [warning] no-react19-deprecated-apis — src/once-ui/components/StyleOverlay.tsx:3
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

244. [warning] no-barrel-import — src/once-ui/components/StyleOverlay.tsx:4
   Import from barrel/index file — import directly from source modules: "./IconButton", "./StylePanel", "./Flex", "./Background"

245. [warning] no-danger — src/once-ui/modules/seo/Schema.tsx:96
   Do not use `dangerouslySetInnerHTML` prop

❌ Errors (2)

useEffect subscribes via `subscribe(...)` but never returns a cleanup — leaks the registration on every re-run and on unmount. Return a cleanup function that calls the matching remove/unsubscribe call · 2 in 2 files

effect-needs-cleanup

Return a cleanup function that releases the subscription / timer: return () =&gt; target.removeEventListener(name, handler) for listeners, return () =&gt; clearInterval(id) / clearTimeout(id) for timers, or return unsubscribe if the subscribe call already returned one

File Lines
src/app/page.tsx 124
src/once-ui/components/Dialog.tsx 90

⚠️ Warnings (243)

Import from barrel/index file — import directly from source modules: "./Flex", "./Text", "./Icon" · 60 in 60 files

no-barrel-import

Import from the direct path: import { Button } from './components/Button' instead of ./components

File Lines
src/once-ui/components/Tag.tsx 6
src/once-ui/components/RevealFx.tsx 6
src/once-ui/components/SegmentedControl.tsx 4
src/once-ui/components/Textarea.tsx 12
src/once-ui/components/SmartLink.tsx 5
…and 55 more files view on react.review
forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly · 59 in 58 files

no-react19-deprecated-apis

Pass ref as a regular prop on function components — forwardRef is no longer needed in React 19+. Replace useContext(X) with use(X) for branch-aware context reads. Only enabled on projects detected as React 19+.

File Lines
src/once-ui/components/Dialog.tsx 8, 10
src/once-ui/components/Tag.tsx 3
src/once-ui/components/StatusIndicator.tsx 3
src/once-ui/components/RevealFx.tsx 3
src/once-ui/components/ThemeProvider.tsx 3
…and 53 more files view on react.review
Array index "index" used as key — causes bugs when list is reordered or filtered · 15 in 11 files

no-array-index-as-key

Use a stable unique identifier: key={item.id} or key={item.slug} — index keys break on reorder/filter

File Lines
src/once-ui/components/Table.tsx 55, 85
src/once-ui/modules/code/CodeBlock.tsx 155, 234
src/once-ui/components/Carousel.tsx 111, 130
src/once-ui/components/DatePicker.tsx 211, 274
src/once-ui/components/TagInput.tsx 78
…and 6 more files view on react.review
Non-descriptive handler name "handleFocus" — name should describe what it does, not when it runs · 14 in 8 files

no-generic-handler-names

Rename to describe the action: e.g. handleSubmitsaveUserProfile, handleClicktoggleSidebar

File Lines
src/once-ui/components/Textarea.tsx 191, 192, 201
src/once-ui/components/TagInput.tsx 59, 60
src/once-ui/components/Select.tsx 172, 216
src/once-ui/components/Input.tsx 161, 162
src/once-ui/components/SmartImage.tsx 131, 184
…and 3 more files view on react.review
setProject({ ...project, ... }) — use functional update `setProject(prev => ({ ...prev, ... }))` to avoid stale closures · 12 in 2 files

rerender-functional-setstate

Use the callback form: setState(prev =&gt; prev + 1) to always read the latest value

File Lines
src/app/page.tsx 1301, 1317, 1345, 1354, 1379, 1436, 1445, 1472, +2 more
src/once-ui/components/DatePicker.tsx 153, 156
useState initialized from prop "revealedByDefault" — if this value should stay in sync with the prop, derive it during render instead · 8 in 6 files

no-derived-useState

Remove useState and compute the value inline: const value = transform(propName)

File Lines
src/once-ui/components/Carousel.tsx 28, 29
src/once-ui/components/DatePicker.tsx 59, 60
src/once-ui/components/RevealFx.tsx 34
src/once-ui/components/Accordion.tsx 37
src/once-ui/components/Dialog.tsx 73
…and 1 more file view on react.review
3 setState calls in a single useEffect — consider using useReducer or deriving state · 7 in 7 files

no-cascading-set-state

Combine into useReducer: const [state, dispatch] = useReducer(reducer, initialState)

File Lines
src/once-ui/components/IconButton.tsx 59
src/once-ui/components/Dialog.tsx 90
src/once-ui/components/DatePicker.tsx 87
src/once-ui/components/MegaMenu.tsx 45
src/once-ui/components/Icon.tsx 50
…and 2 more files view on react.review
useState(getMonth()) calls initializer on every render — use useState(() => getMonth()) for lazy initialization · 5 in 4 files

rerender-lazy-state-init

Wrap in an arrow function so it only runs once: useState(() =&gt; expensiveComputation())

File Lines
src/once-ui/components/DateRangePicker.tsx 33, 34
src/once-ui/components/Checkbox.tsx 32
src/once-ui/components/RadioButton.tsx 28
src/once-ui/components/OTPInput.tsx 29
Inline render function "renderContent()" — extract to a separate component for proper reconciliation · 4 in 3 files

no-render-in-render

Extract to a named component: const ListItem = ({ item }) =&gt; &lt;div&gt;{item.name}&lt;/div&gt;

File Lines
src/once-ui/components/CompareImage.tsx 93, 94
src/once-ui/components/Avatar.tsx 130
src/once-ui/components/DatePicker.tsx 435
"touchmove" listener without { passive: true } — blocks scrolling performance. Only add { passive: true } if the handler does NOT call event.preventDefault() (passive listeners silently ignore preventDefault()) · 4 in 3 files

client-passive-event-listeners

Add { passive: true } as the third argument: addEventListener('scroll', handler, { passive: true }). Only do this if the handler does NOT call event.preventDefault() — passive listeners silently ignore preventDefault(), which breaks features like pull-to-refresh suppression, custom gestures, and nested-scroll containment.

File Lines
src/once-ui/components/CompareImage.tsx 73, 74
src/once-ui/components/Scroller.tsx 53
src/once-ui/components/ScrollToTop.tsx 30
Unknown property found · 3 in 2 files

no-unknown-property

Remove unknown property

File Lines
src/app/page.tsx 854, 1230
src/once-ui/components/Table.tsx 108
useEffect calls prop callback "onClose" with local state in deps — this is the "lift state via callback" anti-pattern; lift state into a shared Provider so both sides read the same source · 3 in 3 files

no-prop-callback-in-effect

Lift the shared state into a Provider so both sides read the same source — no useEffect-driven sync needed

File Lines
src/once-ui/components/Toast.tsx 34
src/once-ui/components/Dialog.tsx 86
src/once-ui/components/LetterFx.tsx 127
Derived state in useEffect — compute during render instead · 3 in 3 files

no-derived-state-effect

For derived state, compute inline: const x = fn(dep). For state resets on prop change, use a key prop: &lt;Component key={prop} /&gt;. See https://react.dev/learn/you-might-not-need-an-effect

File Lines
src/once-ui/components/Background.tsx 94
[src/once-ui/components/Accordion.tsx](https://github.com/divyanshudhruv/sourceful.space/blob/a27392be74f295a0e040ef9221c8dcd4aba33d78/src/once-ui/components/Acc

Issue body truncated. See the full report at react.review/dashboard.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions