Class MediaQueryState

Contains reactive state that changes depending on the match of the media queries of your choice.

Type parameters

Type parameter Description
TQuery: object

constructor

  • Sets up a media query state.

    Parameters

    • queries: TQuery

      The set of queries to watch.

    • Optional options: StateDevOptions

      Passed to the logical state.

    Returns MediaQueryState

devOptions

devOptions: StateDevOptions

Development-time settings

name

  • get name(): null | string
  • Returns the UI state's debug name.

    Returns null | string

query

  • query(key: keyof TQuery): boolean
  • Returns true if the media query specified the key is matched.

    Parameters

    • key: keyof TQuery

      Should be one of the keys given to the constructor.

    Returns boolean

Generated using TypeDoc