UNPKG

@shopify/app-bridge-host

Version:

App Bridge Host contains middleware and components that are meant to be consumed by the app's host. The middleware and `Frame` component are responsible for facilitating messages posted between the client and host, and used to act on actions sent from the

22 lines (21 loc) 818 B
import React from 'react'; import { ApiClientConfig, Application, Middleware } from './'; export declare type ReactComponent<P> = React.StatelessComponent<P> | React.ComponentClass<P>; export interface Context { appBridgeMiddleware: Middleware; } export interface DispatchToProps { (app: Application): any; } export interface WithAppProps<Store> { app: Application; store: Store; } export interface RequiredProps { config: ApiClientConfig; } export interface State { mounted: Boolean; } export declare type StoreToProps<Store> = (obj: any) => Store; export declare function withApp<Store>(storeToProps?: StoreToProps<Store>, dispatchToProps?: DispatchToProps): <OwnProps>(WrappedComponent: ReactComponent<OwnProps>) => React.ComponentClass<OwnProps & RequiredProps & WithAppProps<Store>, any>;