Options
All
  • Public
  • Public/Protected
  • All
Menu

Module providers/NotifyProvider

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

Variables

Functions

Variables

Const Context

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

Definition of React NotifyContext context. Default value is undefined

Functions

Const NotifyProvider

  • NotifyProvider(__namedParameters: object): Element
  • React Component wrapping obtained children with NotifyContext provider, so useNotify can be called from any component in the children subtree. This is the only place where createNotifyContext is called. Internally it uses useEvents so it must be used under EventsProvider

    Parameters

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

    Returns Element

Const useNotify

Generated using TypeDoc