Creating a Home Hub
How to create a Home Hub
Example and code snippet
Single jig Home Hub

name: Expo
title: Expo
category: business
# Data is synced in the index.jigx file.
onLoad:
type: action.sync-entities
options:
provider: DATA_PROVIDER_DYNAMIC
entities:
- default/events
# Use the tabs property to reference the jig you want as the home screen.
# Select an icon for the jig in the bottom navigation bar.
tabs:
- jigId: yoga-wellness
icon: home-apps-logo# To hide any title use ' ' in the title field
title: ' '
type: jig.default
datasources:
yoga:
type: datasource.sqlite
options:
provider: DATA_PROVIDER_DYNAMIC
entities:
- default/events
query:
SELECT
id,
'$.EventName',
'$.StartDate',
'$.Time',
'$.Venue',
'$.Type'
FROM [default/events] WHERE '$.Type' = 'Yoga'
children:
- type: component.image
options:
height: 300
resizeMode: cover
source:
uri: https://images.unsplash.com/photo-1524901548305-08eeddc35080?w=700&auto=format&fit=crop&q=60&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxzZWFyY2h8Nnx8Y2FsbXxlbnwwfHwwfHx8MA%3D%3D
- type: component.list
options:
data: [email protected]
item:
type: component.list-item
options:
title: [email protected]
subtitle: =(@ctx.current.item.Venue & ' ' & @ctx.current.item.StartDate & ' ' & @ctx.current.item.Time)
rightElement:
element: button
title: Book
onPress:
type: action.go-to
options:
linkTo: contactsHome Hub with multiple components & widgets

Home Hub with multiple tabs in bottom navigation bar

Best practice
Last updated
Was this helpful?