Microsoft Power Platform Developer Exam: PCF Component Development Guide

Commands for PCF Component Development

Question

You create a new PCF component.

Please select the three commands that you need to issue before you develop the component.

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D. E. F.

Correct Answers: B, D and F

The Components are reusable blocks that you can use for Power Apps applications.

Power Apps provides out-of-the-box standard controls (components) for creating applications, like HTML Text, Vertical Gallery, or Edit Form.

If your Power Platform solution requires more than standard controls, Power Apps also provides tools to create and reuse the custom components.

Power Apps Component Framework (PCF) helps you to create these components.

You can import and export components from other applications or store them in the Components Library.

Before you develop your component, you need to initialize a Microsoft PCF component template.

First, you create a directory for your component project.

You can use the mkdir command, like (Number 1) mkdir NewComponent.

Then you can create a new component from the template that Microsoft provides, like the following command (Number 2): pac pcf init --namespace NewComponentNamespace --name NewComponent --template field The pac is the Power Apps CLI (pac) command for the initialization of the pcf component.

After pac creates a set of files and directories, you can call (Number 3) npm install to install all dependencies that you need to run your component.

© cmd (Admin) = o x

Microsoft Windows [Version 10.0.19042.867]

, c:\Users\ \Dev\Power Platform\PCF
$ mkdir NewComponent @
angesiaes c:\Users\ \Dev\Power Platform\PCF

i$ cd NewComponent

| c:\Users\ \Dev\Power Platform\PCF\NewComponent
48 pac pcf init --namespace NewComponentNamespace --name NewComponent --template field @
The PowerApps component framework project was successfully created in ‘c:\Users\ \Dev\Power Platform\PCF\NewComponent’ .

Be sure to run ‘npm install* in this directory to install project dependencies.

> « 1 c:\Users\ \Dev\Power Platform\PCF\NewComponent

I$ npm install ®

jnpm deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.

npm |) deprecated opn@6.0.0: The package has been renamed to “open

Inpm deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
Inpm deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated

Inpm deprecated urix@@.1.0: Please see https://github.com/lydell/urix#deprecated

Inpm notice created a lockfile as package-lock.json. You should commit this file.

npm WAM optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.1 (node_modules\chokidar\node_modules\fsevents):

Inpm WAG) notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","“arch":"any"} (current: {"os":"win32", "arch": "xé
4"})

Inpm BEG) optional SKIPPING OPTIONAL DEPENDENCY: fsevents@*1.2.7 (node_modules\watchpack-chokidar2\node_modules\chokidar\node modules\fsevents):

npm QAGu) notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"»
64"})

npm ANN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@41.2.7 (node_modules\live-server\node_modules\chokidar\node_modules\fsevents) :

Inpm BEG) notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x
64"})

npm ANN) pcf-project@1.0@.@ No repository field.

Inpm BEGi) pcf-project@1.0.0 No license field.

ladded 689 packages from 434 contributors and audited 692 packages in 46.766s

36 packages are looking for funding
run “npm fund” for details

found @ vulnerabilities

| c:\Users\ \Dev\Power Platform\PCF\NewComponent

cmd.exe*[*64]:1112 « 171109[64] 1/1 [+] NUM PRIt 157x45  (3,43)25V 20528 100% /

Before you run pac and npm commands, you need to install Npm or Node.js.

It is required to run Microsoft Power Apps CLI.

And then, you can install Microsoft Power Apps CLI.

All other options are incorrect.

For more information about creating Power Apps Component Framework (PCF) component, please visit the below URLs:

When developing a new PowerApps Component Framework (PCF) component, there are several commands that need to be executed before beginning development. Here are the three commands that you need to issue before developing the component:

  1. pac pcf init: This command initializes a new PCF project by creating a project folder structure, including the necessary configuration files.

  2. npm install: This command installs the required dependencies for your PCF project. These dependencies include the PCF controls framework, React, TypeScript, and any other packages that you may need.

  3. npm run build: This command compiles and bundles your PCF component into a distributable format. The output of this command is a JavaScript file that can be imported into PowerApps or Dynamics 365.

Optional command: 4. npm start: This command runs your PCF component locally, allowing you to test your changes in a browser as you develop.

Note: mkdir and pac pcf new are not required commands when creating a new PCF component. mkdir is used to create a new directory, while pac pcf new is used to create a new PCF project from a template.