YAML order
When it comes to ordering YAML elements, it's crucial to structure your Jigx file in a clear and logical manner. By doing so, you can ensure that your YAML data is easy to read, maintain, and troubleshoot, and sometimes, even the performance and order of execution are determined by the order.
Here are the best practices for ordering YAML elements in a jig file and the recommended structure for items in a section, for example, components.
Jig YAML order
Title
Description
Type
Icon
Badge
Inputs
Placeholders
onFocus/onRefresh
Expressions
header
actions
summary
datasources
children
preview
widgets
Order of items in a section
Order of items within a section, for example when defining a component we should aim to standardise as follows:
Type is always the first thing to be defined so that we know what we are dealing with
Meta elements for the list (data)
Item definition
Title
Subtitle
Description
Left element , Right element , Label
action
OnPress
Swipeable
Last updated
Was this helpful?