vigiles API reference
    Preparing search index...

    Function state

    • Declare a recorded fact as an input: state("calendar.synced") in needs makes e.ctx["calendar.synced"] a StateFact. Rides the existing needs path on purpose — a second way to read external state would give up the property that the dependency is declared and checkable from outside the hook.

      Type Parameters

      • const Name extends string

      Parameters

      Returns StateNeed<Name>