-
-
Notifications
You must be signed in to change notification settings - Fork 807
migrate to react 19 #2272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
migrate to react 19 #2272
Changes from all commits
3e39798
201e30e
b9eeb5d
ab22385
7c9f4f5
ba23687
79edea6
17965bd
e12cde5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -407,7 +407,7 @@ function SingleLinePlot({ | |||||
| sparkline = false, | ||||||
| targetLen, | ||||||
| }: SingleLinePlotProps) { | ||||||
| const containerRef = React.useRef<HTMLInputElement>(); | ||||||
| const containerRef = React.useRef<HTMLInputElement>(null); | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wrong ref element type: should be The ref is attached to a Apply this diff: -const containerRef = React.useRef<HTMLInputElement>(null);
+const containerRef = React.useRef<HTMLDivElement>(null);📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
| const domRect = useDimensionsWithExistingRef(containerRef, 300); | ||||||
| const plotHeight = domRect?.height ?? 0; | ||||||
| const plotWidth = domRect?.width ?? 0; | ||||||
|
|
@@ -519,7 +519,7 @@ const SysinfoViewInner = React.memo(({ model }: SysinfoViewProps) => { | |||||
| const plotData = jotai.useAtomValue(model.dataAtom); | ||||||
| const yvals = jotai.useAtomValue(model.metrics); | ||||||
| const plotMeta = jotai.useAtomValue(model.plotMetaAtom); | ||||||
| const osRef = React.useRef<OverlayScrollbarsComponentRef>(); | ||||||
| const osRef = React.useRef<OverlayScrollbarsComponentRef>(null); | ||||||
| const targetLen = jotai.useAtomValue(model.numPoints) + 1; | ||||||
| let title = false; | ||||||
| let cols2 = false; | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| // Copyright 2025, Command Line Inc. | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| /// <reference types="react/jsx-runtime" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Type mismatch: React.ReactElement cannot be null
preIconButtonElem is initialized with null but typed as React.ReactElement. This will fail under strict typing. Use a nullable union.
📝 Committable suggestion
🤖 Prompt for AI Agents