π SPFx - Please upgrade React to modern [and supported] version of React (ideally v18, but at least v17)
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.
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.
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
+1 of this request. It would be great to see an upgrade on the version of React.
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 :)
If youβre actively working on it, then why was this issue closed?
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.
+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 :)
@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).
Thanks, @AJIXuMuK !
@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"
},
@jdavis61 see: https://github.com/SharePoint/sp-dev-docs/issues?q=is%3Aissue+is%3Aopen+label%3Areact-17
It's coming... soon...
in the latest beta (1.16.0-beta.2) we've updated React to 17
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