Skip to content

fix(v8): resolve react 19 type issues for v8 packages - #35288

Merged
Martin Hochel (Hotell) merged 8 commits into
microsoft:masterfrom
dmytrokirpa:fix-v8-react-19-type-issues
Oct 8, 2025
Merged

Martin Hochel (Hotell) merged 8 commits into
microsoft:masterfrom
dmytrokirpa:fix-v8-react-19-type-issues

Conversation

@dmytrokirpa

@dmytrokirpa Dmytro Kirpa (dmytrokirpa) commented Oct 7, 2025 •

Copy link
Copy Markdown
Contributor

Previous Behavior

As described in the #35203 there were 389 TS errors reported by react-integration-tester for v8 packages:

package e2e test type-check
react N/A 🔴 N/A
react-hooks N/A ✅ N/A
react-examples ( covers react,charting,experiments ) ✅ N/A 🔴 / 389 errors in 225 files
react-charting N/A 🔴 N/A
react-experiments N/A 🔴 N/A

New Behavior

This PR fixes all reported TS errors and enables react-integration-test (type-check only for now, tests are in progress too but will be in separate PRs):

  • problem: TS2503: Cannot find namespace 'JSX'
    solution: provide same custom JSX namespace types like we have in react-utilities to v8
  • problem: TS2322: Type 'RefObject<IDetailsList | null>' is not assignable to type 'IRefObject<IDetailsList> | undefined' -> componentRef?: IRefObject<IComboBox>;
    solution: updating ref types like for v9 by adding null to RefObject<Type> => RefObject<Type | null>
  • problem: TS2554: Expected 1 arguments, but got 0. -> React.useRef<number | null>()
    solution: updating useRef like React.useRef<number | null>() => React.useRef<number | null>(null)
  • problem: error TS2786: 'TilesList' cannot be used as a JSX component. Its type 'typeof TilesList' is not a valid JSX element type. Type typeof TilesList is not assignable to type new (props: any) => Component<any, any, any>. Types of construct signatures are incompatible. Type new <TItem>(props: ITilesListProps<TItem>, context: any) => TilesList<TItem> is not assignable to type new (props: any) => Component<any, any, any>. Target signature provides too few arguments. Expected 2 or more, but got 1.
    solution: Make the 2nd argument of the class component constructor optional context: any => context?: any, eg constructor(props: Props, context: any) => constructor(props: Props, context?: any)

Related Issue(s)

@github-actions

github-actions Bot commented Oct 7, 2025 •

Copy link
Copy Markdown

📊 Bundle size report

Package & Exports Baseline (minified/GZIP) PR Change
react
ActivityItem
71.196 kB
23.345 kB
71.22 kB
23.347 kB
24 B
2 B
react
Announced
38.466 kB
13.274 kB
38.472 kB
13.275 kB
6 B
1 B
react
Breadcrumb
200.704 kB
59.591 kB
200.805 kB
59.601 kB
101 B
10 B
react
Button
194.253 kB
55.877 kB
194.354 kB
55.886 kB
101 B
9 B
react
ButtonGrid
179.141 kB
53.883 kB
179.242 kB
53.891 kB
101 B
8 B
react
Calendar
121.126 kB
36.822 kB
121.162 kB
36.83 kB
36 B
8 B
react
Callout
84.233 kB
27.586 kB
84.299 kB
27.593 kB
66 B
7 B
react
Check
53.182 kB
17.832 kB
53.206 kB
17.835 kB
24 B
3 B
react
Checkbox
59.948 kB
19.872 kB
59.978 kB
19.874 kB
30 B
2 B
react
ChoiceGroup
65.458 kB
21.462 kB
65.488 kB
21.465 kB
30 B
3 B
react
ChoiceGroupOption
58.745 kB
19.351 kB
58.769 kB
19.353 kB
24 B
2 B
react
Coachmark
92.652 kB
29.303 kB
92.7 kB
29.305 kB
48 B
2 B
react
ColorPicker
134.856 kB
42.108 kB
134.934 kB
42.12 kB
78 B
12 B
react
ComboBox
250.586 kB
71.503 kB
250.687 kB
71.515 kB
101 B
12 B
react
CommandBar
201.76 kB
59.381 kB
201.861 kB
59.387 kB
101 B
6 B
react
ContextualMenu
154.128 kB
47.559 kB
154.229 kB
47.566 kB
101 B
7 B
react
DatePicker
183.167 kB
55.875 kB
183.251 kB
55.892 kB
84 B
17 B
react
DetailsList
229.894 kB
65.799 kB
229.929 kB
65.81 kB
35 B
11 B
react
Dialog
210.059 kB
62.349 kB
210.16 kB
62.358 kB
101 B
9 B
react
Divider
19.582 kB
6.838 kB
19.588 kB
6.84 kB
6 B
2 B
react
DocumentCard
215.742 kB
63.648 kB
215.843 kB
63.666 kB
101 B
18 B
react
Dropdown
233.05 kB
67.954 kB
233.151 kB
67.962 kB
101 B
8 B
react
Fabric
41.722 kB
14.34 kB
41.728 kB
14.343 kB
6 B
3 B
react
Facepile
209.276 kB
62.369 kB
209.377 kB
62.375 kB
101 B
6 B
react
FloatingPicker
240.764 kB
68.214 kB
240.865 kB
68.222 kB
101 B
8 B
react
FocusTrapZone
16.978 kB
5.889 kB
16.99 kB
5.891 kB
12 B
2 B
react
Grid
179.141 kB
53.883 kB
179.242 kB
53.891 kB
101 B
8 B
react
GroupedList
135.012 kB
40.664 kB
135.035 kB
40.67 kB
23 B
6 B
react
GroupedListV2
122.629 kB
37.753 kB
122.659 kB
37.758 kB
30 B
5 B
react
HoverCard
96.718 kB
30.685 kB
96.784 kB
30.688 kB
66 B
3 B
react
Icon
51.863 kB
17.261 kB
51.887 kB
17.263 kB
24 B
2 B
react
Image
46.877 kB
15.692 kB
46.901 kB
15.695 kB
24 B
3 B
react
Keytip
81.241 kB
26.671 kB
81.301 kB
26.677 kB
60 B
6 B
react
KeytipData
14.032 kB
4.582 kB
14.05 kB
4.583 kB
18 B
1 B
react
KeytipLayer
103.029 kB
31.896 kB
103.089 kB
31.9 kB
60 B
4 B
react
Keytips
105.801 kB
32.898 kB
105.873 kB
32.904 kB
72 B
6 B
react
Label
38.318 kB
13.239 kB
38.324 kB
13.241 kB
6 B
2 B
react
Layer
48.077 kB
16.346 kB
48.089 kB
16.348 kB
12 B
2 B
react
Link
39.659 kB
13.651 kB
39.665 kB
13.653 kB
6 B
2 B
react
MarqueeSelection
74.484 kB
22.396 kB
74.49 kB
22.402 kB
6 B
6 B
react
MessageBar
189.287 kB
56.32 kB
189.388 kB
56.33 kB
101 B
10 B
react
Modal
93.678 kB
30.217 kB
93.738 kB
30.223 kB
60 B
6 B
react
Nav
186.724 kB
55.713 kB
186.825 kB
55.723 kB
101 B
10 B
react
OverflowSet
33.336 kB
11.279 kB
33.354 kB
11.282 kB
18 B
3 B
react
Overlay
40.879 kB
14.075 kB
40.885 kB
14.077 kB
6 B
2 B
react
Panel
200.226 kB
59.327 kB
200.327 kB
59.336 kB
101 B
9 B
react
Persona
114.513 kB
36.43 kB
114.591 kB
36.435 kB
78 B
5 B
react
PersonaCoin
114.513 kB
36.43 kB
114.591 kB
36.435 kB
78 B
5 B
react
PersonaPresence
58.052 kB
19.371 kB
58.076 kB
19.372 kB
24 B
1 B
react
Pickers
297.809 kB
82.985 kB
297.91 kB
82.996 kB
101 B
11 B
react
Pivot
187.621 kB
56.485 kB
187.734 kB
56.5 kB
113 B
15 B
react
Popup
12.294 kB
4.195 kB
12.312 kB
4.197 kB
18 B
2 B
react
PositioningContainer
73.415 kB
23.685 kB
73.445 kB
23.685 kB
30 B
react
ProgressIndicator
39.471 kB
13.526 kB
39.477 kB
13.528 kB
6 B
2 B
react
Rating
82.056 kB
26.086 kB
82.086 kB
26.09 kB
30 B
4 B
react
Fluent UI React (entire library)
1.019 MB
283.153 kB
1.019 MB
283.171 kB
136 B
18 B
react
ResizeGroup
13.338 kB
4.377 kB
13.35 kB
4.379 kB
12 B
2 B
react
ScrollablePane
55.535 kB
17.715 kB
55.541 kB
17.718 kB
6 B
3 B
react
SearchBox
187.523 kB
55.912 kB
187.63 kB
55.936 kB
107 B
24 B
react
SelectedItemsList
231.249 kB
67.169 kB
231.35 kB
67.176 kB
101 B
7 B
react
Separator
35.359 kB
12.13 kB
35.365 kB
12.132 kB
6 B
2 B
react
Shimmer
49.237 kB
16.255 kB
49.249 kB
16.258 kB
12 B
3 B
react
ShimmeredDetailsList
240.675 kB
68.541 kB
240.71 kB
68.549 kB
35 B
8 B
react
Slider
57.615 kB
19.194 kB
57.627 kB
19.198 kB
12 B
4 B
react
SpinButton
191.196 kB
56.998 kB
191.297 kB
57.006 kB
101 B
8 B
react
Spinner
41.753 kB
14.466 kB
41.759 kB
14.468 kB
6 B
2 B
react
SwatchColorPicker
189.536 kB
57.41 kB
189.637 kB
57.417 kB
101 B
7 B
react
TeachingBubble
204.538 kB
60.3 kB
204.639 kB
60.311 kB
101 B
11 B
react
TextField
80.768 kB
25.3 kB
80.798 kB
25.308 kB
30 B
8 B
react
TimePicker
240.414 kB
69.299 kB
240.515 kB
69.311 kB
101 B
12 B
react
Toggle
46.189 kB
15.954 kB
46.201 kB
15.957 kB
12 B
3 B
react
Tooltip
87.013 kB
28.144 kB
87.073 kB
28.151 kB
60 B
7 B
react
Utilities
82.932 kB
25.149 kB
82.938 kB
25.15 kB
6 B
1 B
react
WeeklyDayPicker
101.318 kB
31.639 kB
101.348 kB
31.644 kB
30 B
5 B
react-charting
AreaChart
284.332 kB
87.922 kB
284.398 kB
87.93 kB
66 B
8 B
react-charting
ChartHoverCard
37.19 kB
12.698 kB
37.196 kB
12.7 kB
6 B
2 B
react-charting
DeclarativeChart
616.749 kB
172.694 kB
616.815 kB
172.704 kB
66 B
10 B
react-charting
DonutChart
190.707 kB
59.669 kB
190.773 kB
59.678 kB
66 B
9 B
react-charting
GanttChart
263.725 kB
81.758 kB
263.791 kB
81.764 kB
66 B
6 B
react-charting
GaugeChart
191.226 kB
59.23 kB
191.292 kB
59.235 kB
66 B
5 B
react-charting
GroupedVerticalBarChart
275.452 kB
84.768 kB
275.518 kB
84.771 kB
66 B
3 B
react-charting
HeatMapChart
266.686 kB
82.47 kB
266.752 kB
82.478 kB
66 B
8 B
react-charting
HorizontalBarChart
127.178 kB
39.924 kB
127.238 kB
39.931 kB
60 B
7 B
react-charting
HorizontalBarChartWithAxis
273.441 kB
83.714 kB
273.507 kB
83.72 kB
66 B
6 B
react-charting
Legends
151 kB
46.241 kB
151.066 kB
46.245 kB
66 B
4 B
react-charting
LineChart
313.897 kB
94.904 kB
313.963 kB
94.908 kB
66 B
4 B
react-charting
MultiStackedBarChart
181.176 kB
55.069 kB
181.242 kB
55.075 kB
66 B
6 B
react-charting
PieChart
134.179 kB
42.275 kB
134.239 kB
42.282 kB
60 B
7 B
react-charting
SankeyChart
145.995 kB
45.451 kB
146.055 kB
45.456 kB
60 B
5 B
react-charting
ScatterChart
270.077 kB
84.063 kB
270.143 kB
84.068 kB
66 B
5 B
react-charting
Sparkline
87.61 kB
29.668 kB
87.616 kB
29.671 kB
6 B
3 B
react-charting
StackedBarChart
174.857 kB
52.649 kB
174.923 kB
52.655 kB
66 B
6 B
react-charting
TreeChart
84.803 kB
26.633 kB
84.809 kB
26.636 kB
6 B
3 B
react-charting
VerticalBarChart
285.861 kB
86.244 kB
285.927 kB
86.249 kB
66 B
5 B
react-charting
VerticalStackedBarChart
281.731 kB
85.732 kB
281.797 kB
85.737 kB
66 B
5 B
Unchanged fixtures
Package & Exports Size (minified/GZIP)
global-context
createContext
510 B
328 B
global-context
createContextSelector
537 B
339 B
keyboard-key
keyboard-key package
3.746 kB
1.928 kB
keyboard-keys
Multiple keyCodes
50 B
70 B
keyboard-keys
Multiple keys
87 B
94 B
keyboard-keys
Single key
44 B
64 B
keyboard-keys
Single keyCode
39 B
59 B
priority-overflow
createOverflowManager
4.519 kB
1.881 kB
react
Autofill
15.42 kB
4.766 kB
react
Color
7.789 kB
3.127 kB
react
DateTimeUtilities
5.244 kB
1.849 kB
react
DragDrop
8.343 kB
2.724 kB
react
DraggableZone
34.28 kB
11.488 kB
react
ExtendedPicker
96.823 kB
27.866 kB
react
FocusZone
55.1 kB
17.451 kB
react
Icons
66.339 kB
24.385 kB
react
List
39.346 kB
12.454 kB
react
Positioning
22.764 kB
7.683 kB
react
ResponsiveMode
8.13 kB
2.966 kB
react
SelectableOption
724 B
413 B
react
Selection
42.418 kB
12.26 kB
react
Stack
42.03 kB
14.386 kB
react
Sticky
32.577 kB
10.488 kB
react
Styling
46.033 kB
15.135 kB
react
Text
36.886 kB
12.806 kB
react
Theme
43.486 kB
14.168 kB
react
ThemeGenerator
12.384 kB
4.116 kB
react
Viewport
23.872 kB
7.642 kB
react
WindowProvider
1.059 kB
541 B
react-accordion
Accordion (including children components)
108.221 kB
33.115 kB
react-aria
ARIA - Default
237 B
181 B
react-avatar
Avatar
48.518 kB
15.508 kB
react-avatar
AvatarGroup
19.235 kB
7.617 kB
react-avatar
AvatarGroupItem
62.662 kB
19.727 kB
react-badge
Badge
25.089 kB
8.256 kB
react-badge
CounterBadge
25.869 kB
8.53 kB
react-badge
PresenceBadge
24.929 kB
9.147 kB
react-breadcrumb
@fluentui/react-breadcrumb - package
114.22 kB
31.522 kB
react-button
Button
36.705 kB
10.508 kB
react-button
CompoundButton
43.117 kB
11.812 kB
react-button
MenuButton
41.6 kB
11.902 kB
react-button
SplitButton
49.667 kB
13.477 kB
react-button
ToggleButton
52.636 kB
12.285 kB
react-calendar-compat
Calendar Compat
149.796 kB
39.951 kB
react-card
Card - All
106.044 kB
29.799 kB
react-card
Card
98.69 kB
27.924 kB
react-card
CardFooter
13.662 kB
5.517 kB
react-card
CardHeader
16.195 kB
6.38 kB
react-card
CardPreview
13.729 kB
5.645 kB
react-charts
AreaChart
384.803 kB
117.317 kB
react-charts
DeclarativeChart
681.499 kB
195.683 kB
react-charts
DonutChart
296.931 kB
88.744 kB
react-charts
FunnelChart
288.17 kB
85.701 kB
react-charts
GanttChart
368.041 kB
110.814 kB
react-charts
GaugeChart
311.221 kB
92.228 kB
react-charts
GroupedVerticalBarChart
371.572 kB
111.942 kB
react-charts
HeatMapChart
370.069 kB
112.439 kB
react-charts
HorizontalBarChart
295.674 kB
86.998 kB
react-charts
HorizontalBarChartWithAxis
63 B
83 B
react-charts
Legends
235.208 kB
69.59 kB
react-charts
LineChart
394.308 kB
118.854 kB
react-charts
SankeyChart
198.878 kB
61.101 kB
react-charts
ScatterChart
375.828 kB
113.387 kB
react-charts
Sparkline
91.123 kB
28.692 kB
react-charts
VerticalBarChart
410.642 kB
118.919 kB
react-charts
VerticalStackedBarChart
382.456 kB
114.785 kB
react-checkbox
Checkbox
34.335 kB
11.786 kB
react-color-picker
ColorArea
49.32 kB
17.32 kB
react-color-picker
ColorPicker
17.95 kB
7.143 kB
react-color-picker
ColorSlider
41.493 kB
15.375 kB
react-combobox
Combobox (including child components)
106.952 kB
34.798 kB
react-combobox
Dropdown (including child components)
107.582 kB
34.719 kB
react-components
react-components: Button, FluentProvider & webLightTheme
68.796 kB
19.903 kB
react-components
react-components: Accordion, Button, FluentProvider, Image, Menu, Popover
236.627 kB
68.563 kB
react-components
react-components: FluentProvider & webLightTheme
43.63 kB
14.257 kB
react-components
react-components: entire library
1.277 MB
320.927 kB
react-datepicker-compat
DatePicker Compat
226.669 kB
64.105 kB
react-dialog
Dialog (including children components)
103.578 kB
30.891 kB
react-divider
Divider
20.626 kB
7.654 kB
react-field
Field
22.657 kB
8.602 kB
react-image
Image
14.473 kB
5.919 kB
react-input
Input
27.148 kB
9.108 kB
react-jsx-runtime
Classic Pragma
1.101 kB
550 B
react-jsx-runtime
JSX Dev Runtime
2.8 kB
1.251 kB
react-jsx-runtime
JSX Runtime
3.422 kB
1.493 kB
react-label
Label
13.799 kB
5.644 kB
react-link
Link
16.746 kB
6.785 kB
react-list
List
88.922 kB
26.387 kB
react-list
ListItem
112.381 kB
33.224 kB
react-menu
Menu (including children components)
165.367 kB
50.066 kB
react-menu
Menu (including selectable components)
168.349 kB
50.667 kB
react-message-bar
MessageBar (all components)
24.12 kB
8.966 kB
react-motion
@fluentui/react-motion - createMotionComponent()
4.109 kB
1.806 kB
react-motion
@fluentui/react-motion - createPresenceComponent()
5.771 kB
2.396 kB
react-motion
@fluentui/react-motion - PresenceGroup
1.727 kB
823 B
react-overflow
hooks only
12.931 kB
4.85 kB
react-persona
Persona
55.409 kB
17.389 kB
react-popover
Popover
132.3 kB
41.178 kB
react-portal
Portal
15.411 kB
5.385 kB
react-portal-compat
PortalCompatProvider
8.386 kB
2.624 kB
react-positioning
usePositioning
28.865 kB
10.146 kB
react-positioning
useSafeZoneArea
12.29 kB
4.967 kB
react-progress
ProgressBar
16.593 kB
6.613 kB
react-provider
FluentProvider
23.806 kB
8.557 kB
react-radio
Radio
31.8 kB
10.006 kB
react-radio
RadioGroup
14.889 kB
6.09 kB
react-select
Select
26.95 kB
9.833 kB
react-slider
Slider
37.211 kB
12.461 kB
react-spinbutton
SpinButton
34.431 kB
11.449 kB
react-spinner
Spinner
24.396 kB
8.201 kB
react-swatch-picker
@fluentui/react-swatch-picker - package
106.047 kB
30.539 kB
react-switch
Switch
34.51 kB
11.014 kB
react-table
DataGrid
161.122 kB
45.55 kB
react-table
Table (Primitives only)
41.94 kB
13.559 kB
react-table
Table as DataGrid
131.446 kB
36.336 kB
react-table
Table (Selection only)
69.808 kB
19.693 kB
react-table
Table (Sort only)
68.451 kB
19.308 kB
react-tag-picker
@fluentui/react-tag-picker - package
188.343 kB
56.458 kB
react-tags
InteractionTag
14.561 kB
5.865 kB
react-tags
Tag
30.379 kB
9.779 kB
react-tags
TagGroup
83.125 kB
24.561 kB
react-teaching-popover
TeachingPopover
102.777 kB
30.738 kB
react-text
Text - Default
16.19 kB
6.366 kB
react-text
Text - Wrappers
19.35 kB
6.695 kB
react-textarea
Textarea
25.53 kB
9.361 kB
react-theme
Single theme token import
69 B
89 B
react-theme
Teams: all themes
36.081 kB
7.658 kB
react-theme
Teams: Light theme
20.025 kB
5.723 kB
react-timepicker-compat
TimePicker
109.935 kB
36.335 kB
react-toast
Toast (including Toaster)
103.349 kB
30.964 kB
react-tooltip
Tooltip
57.922 kB
20.084 kB
react-tree
FlatTree
149.007 kB
42.628 kB
react-tree
PersonaFlatTree
149.763 kB
42.759 kB
react-tree
PersonaTree
146.028 kB
41.626 kB
react-tree
Tree
145.278 kB
41.487 kB
react-utilities
SSRProvider
180 B
160 B
🤖 This report was generated against d9fc192aaac99aa7ad35b7dfa7c01c291a9dfc27

@github-actions

github-actions Bot commented Oct 7, 2025

Copy link
Copy Markdown

Pull request demo site: URL

@github-actions github-actions Bot added the CI label Oct 7, 2025
Comment thread .github/workflows/pr.yml
- name: React Versions Integration Tests (17,19) - Test
run: |
FLUENT_JEST_WORKER=2 yarn nx affected -t test-rit--17--test,test-rit--17--type-check,test-rit--19--test,test-rit--19--type-check --exclude='react-19-tests-v9,react-charting,react,react-hooks,react-examples,react-experiments'
FLUENT_JEST_WORKER=2 yarn nx affected -t test-rit--17--test,test-rit--19--test --exclude='react-19-tests-v9,react-charting,react,react-hooks,react-examples,react-experiments'

@dmytrokirpa Dmytro Kirpa (dmytrokirpa) Oct 7, 2025 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Temporarily split rit-test and rit-typecheck steps as we can run rit-typecheck for v8 packages as well, but tests are not ready yet. Will revert this once tests are ready

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good call, ty

@Hotell Martin Hochel (Hotell) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, we need to add proper linting enforcement like for v9

Comment thread .github/workflows/pr.yml
- name: React Versions Integration Tests (17,19) - Test
run: |
FLUENT_JEST_WORKER=2 yarn nx affected -t test-rit--17--test,test-rit--17--type-check,test-rit--19--test,test-rit--19--type-check --exclude='react-19-tests-v9,react-charting,react,react-hooks,react-examples,react-experiments'
FLUENT_JEST_WORKER=2 yarn nx affected -t test-rit--17--test,test-rit--19--test --exclude='react-19-tests-v9,react-charting,react,react-hooks,react-examples,react-experiments'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good call, ty

@Hotell
Martin Hochel (Hotell) merged commit 2898be4 into microsoft:master Oct 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI Fluent UI react (v8) Issues about @fluentui/react (v8) React 19

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: v8 React 19 support

3 participants