react#Consumer TypeScript Examples

The following examples show how to use react#Consumer. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: app.tsx    From anchor-web-app with Apache License 2.0 5 votes vote down vote up
AppConsumer: Consumer<App<any, any>> = AppContext.Consumer
Example #2
Source File: SnackbarProvider.tsx    From anchor-web-app with Apache License 2.0 5 votes vote down vote up
SnackbarConsumer: Consumer<SnackbarState> =
  SnackbarContext.Consumer
Example #3
Source File: notification.tsx    From anchor-web-app with Apache License 2.0 5 votes vote down vote up
NotificationConsumer: Consumer<NotificationState> =
  NotificationContext.Consumer
Example #4
Source File: theme.tsx    From anchor-web-app with Apache License 2.0 5 votes vote down vote up
ThemeConsumer: Consumer<ThemeState> = ThemeContext.Consumer
Example #5
Source File: Jobs.tsx    From anchor-web-app with Apache License 2.0 5 votes vote down vote up
JobsConsumer: Consumer<Jobs> = JobsContext.Consumer
Example #6
Source File: responses.tsx    From ask-sdk-jsx-for-apl with Apache License 2.0 5 votes vote down vote up
beforeEach(() => {
  responseBuilder = mockResponseBuilder();
  let mock = jest.fn<Consumer<ResponseBuilder>, any>(({ children: fn }) => fn(responseBuilder));
  ResponseBuilderCtx.Consumer = mock as unknown as Consumer<ResponseBuilder>;
});