Navigation
Navigation allows you to flow through the app. Whenever you go-to a jig, the jig is added to the history, this allows you to go back and visit the jigs you visited before, and either show the history (data) on the UI or a new (clear) jig. This is helpful in complex flows, for example, adding multiple lines to an invoice and then submitting the invoice, or adding the details for each guest in a booking.
The go-to action is used to configure the flow of jigs in the app using the behaviour property. With the behaviour you determine if you want to push the screen into the app history, by using the new value, or show the one you already have in history by using the existing value.
New - creates a sequential stack showing the progression of navigation. Presents a new screen you are navigating to, allowing you to capture the next data set to add to the stack currently in the history. Typically, this would be used to capture the next line in an invoice. \

Existing - jumps to previously visited screens by recognizing existing instances. Displays the data of the existing screen you are navigating to, typically used when you want to review the captured lines in an invoice before submitting.

How to configure navigation
In the go-to action use the behaviour property to select new or existing.
Configure the LinkTo property with the jig name you want to open next.
Configure inputs if you are wanting to pass data between jigs.
Considerations:
By adding an
instanceIdto thego-toaction, you choose if you want to create a new state or you want to reuse the existing state of a jig. Do not confuse this with thebehaviourproperty's functionality.If no
inputsandinstanceIdare specified, theinstanceIdof the jig is set tono-inputs.If an
instanceIdis specified, butinputsare not, then theinstanceIduses the one specified.If an
instanceIdandinputsare specified theinstanceIduses the one specified.If no
instanceIdis specified andinputsare specified theinstanceIdis hash (uuid) of theinputs.
Example and code snippets
go-to using new & existing behaviour
In this example, three jigs are configured to create a stack of data for each guest, including their Name, Age, and Address. Each jig's go-to action is set with the behaviour property as new, enabling new guest details to be pushed into the app history. In the final jig, a secondary go-to action is added. This action introduces a button to review each guest's data by setting the behaviour property to existing and linking to the first jig in the stack via the linkTo property. The review process will cycle through each guest's details in the stack before completing.


Last updated
Was this helpful?