- mkdir MyReactComponent
- cd MyReactComponent
- pac pcf init --namespace MyComponents --name MyReactComponent --template field
- npm install
- npm install --legacy-peer-deps react react-dom office-ui-fabric-react @fluentui/react
- npm install --legacy-peer-deps @types/react @types/react-dom --save-dev
- code your component
- npm start
- npm run build
- mkdir Solutions
- pac solution init --publisher-name Samples --publisher-prefix samples
- pac solution add-reference --path path\to\main\directory
- open developer command prompt for vscode
- msbuild /t:restore path\to\Solution\folder
- msbuild path\to\Solution\folder
- solution zip file is generated in the
Solution\bin\debug
folder
Imp Links:
Creating first code component in ms power apps
React typescript Form Example 1
React typescript Form Example 2