Components In PowerApp

What are Components?

 
Components are the basic building blocks of canvas apps. It is a resuable part of the app. Using component reduces the time and effort of code duplication. It also allows us to extend capability or create custom controls to be used inside an app.
 
Using component we can create many small modules like Dialog component, Left Navigation, Header and many more.
 

Steps to create a component

 
In our App, we can create a component by going to Components tab > New Component,
 
Components in PowerApp
 
After clicking on New Component add controls as per your requirement.
 
Components in PowerApp
 
Now go to Screen and  Go to custom menu > Your component name will be displayed there.
 
Components in PowerApp
 
After exporting your component the component will be displayed as below,
 
Components in PowerApp
 

Limitation of Component

  1. Using component, no data source on Forms or Collection can be performed as these are meant to be exported.
  2. Media files cannot be exported along with Component.
  3. Component can not be inserted to Gallery or Form.
  4. In Component, Gallery is not supported.
  5. UpdateContext is not supported in Components. To Add/Update data Set property is used.

Summary

 
Components are reusable parts and can be exported and imported to any App, keeping in mind their limitations as well. Component reduces a lot of  effort, as repeated code can be reused.