Skip to content

Instantly share code, notes, and snippets.

View netojose's full-sized avatar
🎯
Focusing

José Neto netojose

🎯
Focusing
View GitHub Profile
@netojose
netojose / ComposeProviders.tsx
Last active September 13, 2022 01:27 — forked from sciotta/ComposeProviders.tsx
Compose React Providers to avoid too much chaining
import React, { ElementType, ReactNode, ReactElement } from 'react'
interface ComposeProvidersProps {
with: Array<{
component: ElementType,
props?: Record<string, unknown>,
}>,
children: ReactNode,
}