Skip to main content

ViewStackTriggerProps

ViewStackTriggerProps = object

Properties

children

children: ComponentProps<typeof Pressable>["children"]


for

for: SimpleEvents | TargetedEvents | ChainedEvents

SimpleEvents allow the easiest implementation of events, but come with some restrictions:

  • The literal commands back | clear | reset will only work inside of the context of a ViewStack
  • When passing a view's UniqueId the behavior is always to push that id onto it's parent's stack

TargetedEvents allow for external control of a ViewStack, the UniqueId of a Stack is passed to know which stack to affect

ChainedEvents allow a list of events from a single control to enable multiple behaviors

Example

// Clear a stack and then push a view on:
['clear', myViewId]

// Reset multiple stacks:
[`reset:${stackOneId}`, `reset:${stackTwoId}`]

// Hydrate a stack with multiple views:
[viewOneId, viewTwoId, viewThreeId]