We have an on-prem Sharepoint 2016 server which has been kept up to date with the latest security and feature updates and patches.
We want to build a client application using SPFx Web parts, particularly interested in React. If I use the current scaffolding generator (1.7), it asks if I want to target Sharepoint 2016 and onward, along with 2019 onward, and simply just Online.
If we select the Sharepoint 2016 option, we get React 15.4 along with “@microsoft/sp” libraries locked to 1.1.x .
If we select the 2019 onward option, then we get React 16.3 along with “@microsoft/sp” libraries locked to 1.7.x .
I’d like to use the latest React features such as the context API and etc when building these webparts, is it possible to deploy the solution built with 2019 onward option onto Sharepoint 2016 ?
If not, can I update my React version in package.json to 16+ while selecting the Sharepoint 2016 scaffolding option ? I know I’ve seen “@microsoft/sp” and “@microsoft/sp-office-ui-fabric-core” libraries that aid in building webparts use the React that is available in your application. Don’t really know if they would break.
Has anyone tried this ?