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,
After clicking on New Component add controls as per your requirement.
Now go to Screen and Go to custom menu > Your component name will be displayed there.
After exporting your component the component will be displayed as below,
Limitation of Component
- Using component, no data source on Forms or Collection can be performed as these are meant to be exported.
- Media files cannot be exported along with Component.
- Component can not be inserted to Gallery or Form.
- In Component, Gallery is not supported.
- 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.