Execute Airplane tasks or call external APIs from a view
Most views will need to make a series of network requests to populate a component with backend data and/or mutate something in the backend.
There are a few ways to fetch data from views. You should choose the simplest method that accomplishes your goal. The following strategies are listed from simplest to most complex:
|Task backed components||Automatically executes an Airplane task or runbook, populates the data in a component, and handles loading and error states. Recommended|
|Manual task execution||Manually executes an Airplane task or runbook. You are in charge of populating the data in a component and handling loading and error states.|
|Calling non-Airplane APIs||Call a non-Airplane API|
Which data fetching strategy should I use?
If you want to execute an Airplane task in a table, select, or button, use Task backed components.
If you want to execute an Airplane task in any other situation, use Manual task execution.
If you want to call a non-Airplane API, use Calling non-Airplane APIs.