-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlint.log
More file actions
47 lines (34 loc) · 2.69 KB
/
Copy pathlint.log
File metadata and controls
47 lines (34 loc) · 2.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
> cortex-next@0.1.0 lint
> eslint
/Users/marinjursic/Desktop/cortex/cortex-next/components/brain/brain-scene.tsx
154:7 warning 'SPLIT_RENDER_PIXEL_RATIO' is assigned a value but never used @typescript-eslint/no-unused-vars
/Users/marinjursic/Desktop/cortex/cortex-next/components/ui/analysis-feedback.tsx
91:7 error Error: Calling setState synchronously within an effect can trigger cascading renders
Effects are intended to synchronize state between React and external systems such as manually updating the DOM, state management libraries, or other platform APIs. In general, the body of an effect should do one or both of the following:
* Update external systems with the latest state from React.
* Subscribe for updates from some external system, calling setState in a callback function when external state changes.
Calling setState synchronously within an effect body causes cascading renders that can hurt performance, and is not recommended. (https://react.dev/learn/you-might-not-need-an-effect).
/Users/marinjursic/Desktop/cortex/cortex-next/components/ui/analysis-feedback.tsx:91:7
89 | useEffect(() => {
90 | if (!visible) {
> 91 | setDisplayProgress(0);
| ^^^^^^^^^^^^^^^^^^ Avoid calling setState() directly within an effect
92 | return;
93 | }
94 | if (phase === "idle" || phase === "complete" || phase === "error") { react-hooks/set-state-in-effect
145:7 error Error: Calling setState synchronously within an effect can trigger cascading renders
Effects are intended to synchronize state between React and external systems such as manually updating the DOM, state management libraries, or other platform APIs. In general, the body of an effect should do one or both of the following:
* Update external systems with the latest state from React.
* Subscribe for updates from some external system, calling setState in a callback function when external state changes.
Calling setState synchronously within an effect body causes cascading renders that can hurt performance, and is not recommended. (https://react.dev/learn/you-might-not-need-an-effect).
/Users/marinjursic/Desktop/cortex/cortex-next/components/ui/analysis-feedback.tsx:145:7
143 | useEffect(() => {
144 | if (phase !== "preparing") {
> 145 | setPreparingTick(0);
| ^^^^^^^^^^^^^^^^ Avoid calling setState() directly within an effect
146 | return;
147 | }
148 | const id = setInterval(() => { react-hooks/set-state-in-effect
/Users/marinjursic/Desktop/cortex/cortex-next/lib/mock-data.ts
15:7 warning 'POINTS_PER_HEMISPHERE' is assigned a value but never used @typescript-eslint/no-unused-vars
✖ 4 problems (2 errors, 2 warnings)