Options
All
  • Public
  • Public/Protected
  • All
Menu

Module providers/DatabaseProvider

This file contains mix of React components and hooks useful for obtaining the DatabaseContext from any component in the project.

Variables

Functions

Variables

Const Context

Context: Context<undefined | DatabaseContext> = React.createContext<DatabaseContext | undefined>(undefined)

Definition of React DatabaseContext context. Default value is undefined

Functions

Const DatabaseProvider

  • DatabaseProvider(__namedParameters: object): Element
  • React Component wrapping obtained children with DatabaseContext provider, so useDatabase can be called from any component in the children subtree. This is the only place where createDatabaseContext is called.

    Parameters

    • __namedParameters: object
      • children: undefined | null | string | number | false | true | object | ReactElement<any, string | function | object> | ReactNodeArray | ReactPortal

    Returns Element

Const useDatabase

Generated using TypeDoc