Options
All
  • Public
  • Public/Protected
  • All
Menu

Module hooks/useItemAt

Functions

Functions

Const useItemAt

  • useItemAt(location: XY | undefined): ItemInfo | undefined
  • React Hook returning item currently spawned at the given location, or undefined if there is no item spawned there. Whenever the given location changes, this hook requests item spawned there from Game API and causes rerender of calling component with obtained item.

    Parameters

    • location: XY | undefined

      Location for which the spawned item should be returned

    Returns ItemInfo | undefined

    Item currently spawned at the given location, or undefined when there is none

Generated using TypeDoc