A container is a block which encapsulates other blocks. For example, a "checklist" encapsulates its children.
A container extends Block and has all the properties that a block has. Calling the transition function on the container transitions the parent block.
Table of contents
Accessing children directly from a container doesn't permit type-safety for block.transitioned.
The up-to-date state of this Block instance.
A function correspond to an intent-based API for signaling state transitions on a block. This function has side effects: it changes the state of other blocks and the flow as well. For example, transitioning a block activates the next block and transitioning the last block finishes a flow.
The up-to-date transitioned values for this Block instance.
Contains the edges which have been transitioned for this instance. If the edge exists, it's value will be true / false, otherwise the value will be undefined.
const [block] = useBlock("HNWvcT78tyTwygnbzU6SW");
const firstTransitioned = block.transitioned['first-edge'];
In typescript, if a block is accessed with generics:
const [block] = useBlock<['a-edge']>("HNWvcT78tyTwygnbzU6SW");
// this is valid
// this is invalid
• field: <V>(
If Dopt is loading or Block does not have a field
with the specified name,
undefined is returned.
null is returned when the field has been explicitly
configured in app.dopt.com to have an empty value.
If a block is contained within another block, for example a "checklistItem" within a "checklist", this property will point to the parent "checklist" block's uid.
Otherwise, this property will be undefined.