Skip to content

Instantly share code, notes, and snippets.

@ecesar88
Forked from ericelliott/pyramid-of-doom.jsx
Created January 17, 2021 03:07
Show Gist options
  • Save ecesar88/2ce32931274aaf544892668a424cdbba to your computer and use it in GitHub Desktop.
Save ecesar88/2ce32931274aaf544892668a424cdbba 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