withContextProps Typed HOC for passing down props from generic React Context. export const Comp = withContextProps<ContextState, WrappedCompProps>(WrappedComp, AppContext.Consumer);