Skip to content

Latest commit

 

History

History
41 lines (30 loc) · 962 Bytes

pr-107.mdx

File metadata and controls

41 lines (30 loc) · 962 Bytes
releaseUrl releaseDate
May 28, 2022

Patch Changes

Core 0.1.5

  • Extend guard expression to support in guards. In Guards are guards that asserts that a machine is in a given state before executing the transition. Learn more

    This helper can be used in inline guards or the gaurds options.

    import { guards } from "@zag-js/core"
    
    const { isIn } = gaurds
    
    const machine = createMachine({
      on: {
        CLICK: {
          guard: isIn("open"),
        },
      },
      states: {
        open: {},
        closed: {},
      },
    })
  • Export the following type utilities:

    • StateFrom: To infer the state information from any machine
    • ContextFrom: To infer the context information from any machine
    • EventFrom: To infer the event types from any machine

Rating 0.1.6

  • Add data-readonly to itemProps