https://github.com/DefinitelyTyped/DefinitelyTyped/issues/31065#issuecomment-547327595
(ref.current as React.MutableRefObject<T> ).current = element;
const ComposeProvider = ({ providers, children }) => {
return providers.reverse().reduce((acc, Val) => <Val>{acc}</Val>, children)
}
() => (
<ComposeProvider providers={[AuthProvider, ...]}>
<Root />
</ComposeProvider>
)