⚙️ Bump react and react-dom to v19 (#60891) · github/docs@229c102 · GitHub
Skip to content

Commit 229c102

Browse files
heiskrCopilot
andauthored
⚙️ Bump react and react-dom to v19 (#60891)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 07510f6 commit 229c102

8 files changed

Lines changed: 68 additions & 74 deletions

File tree

package-lock.json

Lines changed: 45 additions & 60 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 4 deletions

src/frame/components/ui/BumpLink/BumpLink.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import styles from './BumpLink.module.scss'
55

66
export type BumpLinkPropsT = {
77
children?: ReactNode
8-
title: ReactElement | string
8+
title: ReactElement<{ children?: ReactNode }> | string
99
href: string
1010
as?: ElementType<{ className?: string; href: string }>
1111
className?: string

src/frame/components/ui/MarkdownContent/MarkdownContent.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ReactNode } from 'react'
1+
import { memo, ReactNode } from 'react'
22
import type { JSX } from 'react'
33
import cx from 'classnames'
44

@@ -10,12 +10,15 @@ export type MarkdownContentPropsT = {
1010
as?: keyof JSX.IntrinsicElements
1111
}
1212

13-
export const MarkdownContent = ({
13+
// Memoized so that re-renders of the parent (e.g. when ToolPicker/PlatformPicker
14+
// state updates) don't cause React 19 to re-apply `dangerouslySetInnerHTML` and
15+
// wipe out the inline `display` styles set imperatively by the pickers.
16+
export const MarkdownContent = memo(function MarkdownContent({
1417
children,
1518
as: Component = 'div',
1619
className,
1720
...restProps
18-
}: MarkdownContentPropsT) => {
21+
}: MarkdownContentPropsT) {
1922
return (
2023
<Component
2124
{...restProps}
@@ -25,4 +28,4 @@ export const MarkdownContent = ({
2528
: { children })}
2629
/>
2730
)
28-
}
31+
})

src/search/components/input/SearchBarButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ type Props = {
1212
isSearchOpen: boolean
1313
setIsSearchOpen: (value: boolean) => void
1414
params: QueryParams
15-
searchButtonRef: React.RefObject<HTMLButtonElement>
15+
searchButtonRef: React.RefObject<HTMLButtonElement | null>
1616
instanceId?: string
1717
}
1818

src/search/components/input/SearchOverlay.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import styles from './SearchOverlay.module.scss'
3434

3535
type Props = {
3636
searchOverlayOpen: boolean
37-
parentRef: RefObject<HTMLElement>
37+
parentRef: RefObject<HTMLElement | null>
3838
debug: boolean
3939
onClose: () => void
4040
params: {

src/search/components/input/SearchOverlayContainer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ type Props = {
77
setIsSearchOpen: (value: boolean) => void
88
params: QueryParams
99
updateParams: (updates: Partial<QueryParams>) => void
10-
searchButtonRef: React.RefObject<HTMLButtonElement>
10+
searchButtonRef: React.RefObject<HTMLButtonElement | null>
1111
}
1212

1313
export function SearchOverlayContainer({

src/tools/components/InArticlePicker.tsx

Lines changed: 8 additions & 2 deletions

0 commit comments

Comments
 (0)