Update SPFx modules to newer versions of React and TypeScript
Category
- [x] Question
- [ ] Typo
- [ ] Bug
- [ ] Additional article idea
Do you plan to update SPFx modules to newer versions of React (@types/react) and TypeScript?
There is an issue right now with usage of Office UI Fabric React: versions after 4.29.0 are based on @types/react 15.0.38 that is not backward compatible with previous versions. And also uses features of TypeScript 2.3.
So, now there is no way to use latest versions of Office UI Fabric React in SPFx projects.
Steps to Reproduce
yo @microsoft/generator
npm i office-ui-fabric-react
add some Office UI Fabric Control to your code
gulp
@AJIXuMuK, what is the React version in your SPFx installation ?
Also - what version of OUIFR got installed - 4.30.1 ?
@manishgarg1 just after scaffolding:

@patmill I've tried 4.29.0 and 4.30.0. 4.29.0 is the one that is based on @types/react 15.0.38
SPFx, as I understand, uses office-ui-fabric-react of version 2.31.0 and @types/react of version 0.14.46
Correct - you'll want a version that doesn't require the react 15 typings / TS 2.4.
@patmill I'm using version 4.21.2 of office-ui-fabric-react for now. This one works good with SPFx and doesn't have bugs that are there in 4.28.0 (which is the last one that works with SPFx). But the initial question is if you're planning to update SPFx core to move forward latest version of office-ui-fabric-react.
@AJIXuMuK - Yes, support for TS 2.4 / React 15 typings is on our roadmap and we intent to support them soon.
To add some additional urgency to get to the latest this is also now breaking the BotFramework WebChat stuff. They've moved up to latest and it's now not compatible within the SPFx React web part, I've had to go back to angularjs for now because the webchat features are more important than the surround SPFx web part bits.
dependencies: { @ types/react': '15.0.38', 'botframework-directlinejs': '0.9.10', 'core-js': '2.4.1', 'markdown-it': '8.3.1', 'microsoft-adaptivecards': '0.6.0', 'microsoft-speech-browser-sdk': '0.0.1', react: '15.6.1', 'react-dom': '15.6.1', 'react-redux': '5.0.5', redux: '3.7.2', 'redux-observable': '0.13.0', rxjs: '5.3.3', tslib: '1.7.1' },
@patmill is it possible to update 1.1.0 version (used for SharePoint 2016) to typescript 2.4 (or latest version)?
1.1.0 also has some issues with typings are not supported in TS 2.2 (used by SPFx 1.1)?
@patmill As Latest Office-ui-fabric support TS 2.4. and SPFX webpart ( SharePoint 2016 ) supports 2.2.x. It is giving typescripts error when I am trying to use Office-ui-fabric. By When SPFX Typescript will get upgraded to 2.4?? OR is there any work around ?
It seems that you cant use Office UI Fabric React with SPFX due to different ts versions both packages requires so why create product and use outdated libraries versions ?
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