fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

React 18 Epic

Open micahgodbolt opened this issue 3 years ago • 3 comments

React 18 support is multi-faceted. We first need to make sure that our packages can be used in React 18, and then there is work needed to actually USE React 18 in our packages, and determine if any packages will be left behind.

This epic will start tracking the work involved for each of those paths

  • Consumption in React 18 projects
  • Internal use of React 18

Consumption issues found

Fluent UI 9

  • [x] #23872
  • [x] https://github.com/microsoft/fluentui/issues/23625
  • [x] Ensure that useInsertionEffect works properly in CRA and Emotion
  • [ ] #24085
  • [ ] Add entire react-components package to v9 test app and fix typing issues

Fluent UI 8

Build/TS issues found

V9

  • [ ] getSlots needs explicit children | Type 'ExoticComponent<{ children?: ReactNode; }>' is not assignable to type 'ElementType<R[K]> | null'.
  • [ ] resolveShorthand | 'UnknownSlotProps | ReactNodeArray' is not assignable to type 'UnknownSlotProps'.
  • [ ] ssrContext children | <SSRContext.Provider value={value}>{props.children}</SSRContext.Provider>;

Other todos

  • [ ] Create repeatable upgrade to make contribution easier (pick your react version)

micahgodbolt avatar Apr 21 '22 18:04 micahgodbolt

Will FluentUI v8 get React 18 support or only FluentUI v9?

yume-chan avatar Apr 29 '22 11:04 yume-chan

Will FluentUI v8 get React 18 support or only FluentUI v9?

Yes, v8 and v9 will support React 18 as soon as we are confident that the controls will work in the new React version.

micahgodbolt avatar Jul 28 '22 17:07 micahgodbolt

@micahgodbolt Looking forward to this, any updates?

joaomoreno avatar Sep 19 '22 18:09 joaomoreno

@joaomoreno PRs were just merged to update our peer deps. We're as confident as we're able to be about React 18 consumption, so test away and please give us any feedback.

micahgodbolt avatar Oct 13 '22 20:10 micahgodbolt

Going to close this epic down as the focus was to enable consumption in React 18.

micahgodbolt avatar Oct 13 '22 20:10 micahgodbolt

PRs were just merged to update our peer deps

@micahgodbolt thanks for making this change! When do you expect to do your next stable npm release with the update?

JamesBurnside avatar Oct 13 '22 20:10 JamesBurnside

@micahgodbolt react-hooks package still has react <18 in peer deps

antonandreyev avatar Oct 19 '22 08:10 antonandreyev

React hooks was updated in https://github.com/microsoft/fluentui/pull/25278

micahgodbolt avatar Nov 07 '22 15:11 micahgodbolt