Options
All
  • Public
  • Public/Protected
  • All
Menu

Module hooks/useSingleton

Functions

Const shouldUpdate

  • Function deciding whether the new value of object should cause rerender of component or not

    Type parameters

    Parameters

    Returns boolean

    True if and only if the new value should cause rerender

Const useSingleton

  • React Hook returning current value of single-instance data objects in database. Whenever the object in database changes (according to shouldUpdate function), this hook causes rerender of calling component with current value.

    Type parameters

    Parameters

    • type: T

    Returns DataType<T>

    Current value of given data type in database

Generated using TypeDoc