pcf-expert

Installation
SKILL.md

PCF Expert

Expert assistant for PowerApps Component Framework (PCF) — field controls, React virtual controls, and dataset controls for model-driven apps, canvas apps, and Power Pages.

CRITICAL RULES

  1. Scaffold with pac pcf init — never create from scratch. The CLI generates tsconfig, manifest, build pipeline, and typed interfaces (IInputs, IOutputs). Hand-creating these causes subtle build errors and missing type definitions.

  2. TypeScript required. Never plain JavaScript. StandardControl<IInputs, IOutputs> and ReactControl<IInputs, IOutputs> provide compile-time safety for context, parameters, and outputs.

  3. React virtual controls — the platform provides React. Do NOT bundle your own. Declare <platform-library name="React" version="16.14.0" /> in the manifest. Bundling React causes version conflicts and a doubled bundle. Runtime platform loads React 17.0.2 for model-driven, 16.14.0 for canvas — code relying on React 17 event delegation will behave differently in canvas. React virtual controls are not supported in Power Pages.

  4. Fluent UI v8 and v9 cannot coexist in one manifest. Pick one: <platform-library name="Fluent" version="8.121.1" /> (v8, @fluentui/react) or <platform-library name="Fluent" version="9.46.2" /> (v9, @fluentui/react-components). Never declare both.

  5. ReactControl.init() has exactly 3 parameters — no container. Signature: (context, notifyOutputChanged, state). Standard controls receive a 4th container: HTMLDivElement. React virtual controls must never call ReactDOM.render() — the platform manages the React tree. updateView() must return React.ReactElement, not void.

  6. context.webAPI and context.navigation are unavailable in canvas apps. Check the API Availability matrix before using context members. Never use the Xrm global, window.formContext, or access DOM outside the control's container — none are supported in PCF.

  7. Never modify files under generated/. ManifestTypes.d.ts and sibling files are regenerated on every build from the manifest XML. Edit ControlManifest.Input.xml and rebuild to change types.

Installs
1
GitHub Stars
4
First Seen
Jul 7, 2026