import * as React from 'react'; export type ContextShimProps = { context: React.Context; children: (data: T) => any; }; export function ContextShim(props: ContextShimProps) { const context = React.useContext(props.context); return <>{props.children(context)}; }