device
props
name
indica el nombre que le asignaremos a ese tag device
type
location
: queremos obtener la ubicación del dispositivocontacts
: queremos acceder a la lista de contactos del dispositivo
targetType
fetch
: indica que deberá ejecutar un fetch (se debe declarar el mismo). Se enviará el resultado porbody
state
: indica que asignaremos un valor a un statecustomFunction
: indica que debemos ejecutar una function creada en el código del dispositivo.
Example
<screen> <meta> <header>device component</header> </meta> <body> <text>Device example for get locations</text> </body> <footer> <text>Footer</text> </footer> <device action="get" type="location" targetType="fetch" target="getRestaurant" /> <device action="get" type="contacts" targetType="customFunction" target="searchTheBestContact" /></screen>