Skip to content

Instantly share code, notes, and snippets.

@ericelliott
Created August 30, 2020 03:23
Show Gist options
  • Save ericelliott/ec774d08616ddbfeb544cef90e3aa97e to your computer and use it in GitHub Desktop.
Save ericelliott/ec774d08616ddbfeb544cef90e3aa97e to your computer and use it in GitHub Desktop.
Pyramid of Doom
import FeatureProvider from '../providers/feature-provider';
import EnvProvider from '../providers/env-provider';
import LoaderProvider from '../providers/loader-provider';
import CouponProvider from '../providers/coupon-provider';
import LayoutProvider from '../providers/layout-provider';
import AuthProvider from '../providers/auth-provider';
import RouterProvider from '../providers/RouterProvider';
import MagicLinkProvider from '../providers/magic-link-provider';
import PageComponent from './page-container';
const WrappedComponent = (...props) => (
<EnvProvider { ...props }>
<AuthProvider>
<LoaderProvider>
<LayoutProvider showFooter={ true }>
<FeatureProvider>
<RouterProvider>
<CouponProvider>
<MagicLinkProvider>
<YourPageComponent />
</MagicLinkProvider>
</CouponProvider>
</RouterProvider>
</FeatureProvider>
</LayoutProvider>
</LoaderProvider>
</AuthProvider>
</EnvProvider>
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment