sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

πŸ™ SPFx - Please upgrade React to modern [and supported] version of React (ideally v18, but at least v17)

Open andrewconnell opened this issue 3 years ago β€’ 11 comments

What type of issue is this?

Question

What SharePoint development model, framework, SDK or API is this about?

πŸ’₯ SharePoint Framework

Target SharePoint environment

SharePoint Online

What browser(s) / client(s) have you tested

  • [ ] πŸ’₯ Internet Explorer
  • [ ] πŸ’₯ Microsoft Edge
  • [ ] πŸ’₯ Google Chrome
  • [ ] πŸ’₯ FireFox
  • [ ] πŸ’₯ Safari
  • [ ] mobile (iOS/iPadOS)
  • [ ] mobile (Android)
  • [X] not applicable
  • [ ] other (enter in the "Additional environment details" area below)

Additional environment details

  • SPFx v1.15
  • Node.js v16

Issue description

The current version of React in new SPFx v1.15 projects is React v16. That version was released FOUR years ago (April 2018). Since then, there have been two major releases of React... v17 (nearly 2 years ago, October 2020) & v18 (current).

You can't even get the docs for the React v16 version from the React docs anymore.

PLEASE upgrade to a more modern version of React. While I understand you can't run two versions of React on the same page without a LOT of gymnastics, even though SPO uses React v16, it's outdated and not supported.

andrewconnell avatar Jul 02 '22 11:07 andrewconnell

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

ghost avatar Jul 02 '22 11:07 ghost

Hi, You are right. I asked the question a few months ago, but no precise date (in 2 or 3 years, as usual :D) https://github.com/SharePoint/sp-dev-docs/issues/7864

PooLP avatar Jul 04 '22 08:07 PooLP

+1 of this request. It would be great to see an upgrade on the version of React.

hesperanca avatar Jul 05 '22 00:07 hesperanca

Thanks @andrewconnell for bringing this up! We have some internal dependencies that slow down this kind of upgrade. But we're actively working on it.

Hope to have some updates during this CY, definitely not in 2-3 years :)

AJIXuMuK avatar Jul 05 '22 16:07 AJIXuMuK

If you’re actively working on it, then why was this issue closed?

andrewconnell avatar Jul 06 '22 01:07 andrewconnell

This would be huge. Is there any way you could make the fact that you are working on it transparent in the roadmap? Perhaps even an overview of the challenges involved and how the community might help to move things along?

There are many react related npm packages that have their latest version dependant on a more current version of React.

ryanjfarrell avatar Jul 06 '22 03:07 ryanjfarrell

+1 to making this transparent on the roadmap. This way we can orchestrate other changes we need to make for this important upgrade. The good thing is, when after you have upgraded, React is supposed to be backward compatible, hopefully reducing the upgrade demands in the future :)

SiemvandenBerg avatar Jul 19 '22 08:07 SiemvandenBerg

@ryanjfarrell - we can include that in Roadmap. I'd expect this change in SPFx 1.16 or 1.17 (both of those should be release by end of 2022).

AJIXuMuK avatar Jul 20 '22 13:07 AJIXuMuK

Thanks, @AJIXuMuK !

ryanjfarrell avatar Jul 20 '22 15:07 ryanjfarrell

@ryanjfarrell - we can include that in Roadmap. I'd expect this change in SPFx 1.16 or 1.17 (both of those should be release by end of 2022).

Looks like React is still version 16.13.1 with 1.16.0-beta.1. Hoping to see the upgrade in version 1.17.

  "dependencies": {
    "tslib": "2.3.1",
    "react": "16.13.1",
    "react-dom": "16.13.1",
    "office-ui-fabric-react": "7.192.0",
    "@microsoft/sp-core-library": "1.16.0-beta.1",
    "@microsoft/sp-property-pane": "1.16.0-beta.1",
    "@microsoft/sp-webpart-base": "1.16.0-beta.1",
    "@microsoft/sp-lodash-subset": "1.16.0-beta.1",
    "@microsoft/sp-office-ui-fabric-core": "1.16.0-beta.1"
  },

jrdavismaine avatar Oct 09 '22 15:10 jrdavismaine

@jdavis61 see: https://github.com/SharePoint/sp-dev-docs/issues?q=is%3Aissue+is%3Aopen+label%3Areact-17

It's coming... soon...

andrewconnell avatar Oct 10 '22 09:10 andrewconnell

in the latest beta (1.16.0-beta.2) we've updated React to 17

AJIXuMuK avatar Oct 31 '22 16:10 AJIXuMuK

Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues

ghost avatar Nov 07 '22 18:11 ghost