on master help sign in
checkpoint: again
commitcec0b6dfe366aa61125fb1f39aabfe17ac124809 authorMatt Condon (shrugs) <mattgcondon@gmail.com> dateTue 11 Jun 2019, 14:04 (7 years ago) parentaf32282
2 files changed+3−1
src/bridge/Bridge.js+2−1 src/bridge/lib/nest.js+1
src/bridge/Bridge.js+2−1
@@ -19,9 +19,9 @@ import {
1919} from './lib/wallet';
2020import { BRIDGE_ERROR } from './lib/error';
2121import { isDevelopment } from './lib/flags';
22+import nest from './lib/nest';
2223import { OnlineProvider } from './store/online';
2324import { NetworkProvider } from './store/network';
24−import nest from './lib/nest';
2525
2626// NB(shrugs): toggle this variable to use the default local state.
2727// don't commit changes to this line, but there shouldn't be a problem
@@ -64,6 +64,7 @@ const VariableWidthColumn = withHistory(({ history, children }) => (
6464 </Col>
6565));
6666
67+// nest all of the providers within each other to avoid hella depth
6768const AllProviders = nest([
6869 HistoryProvider,
6970 TxnConfirmationsProvider,
src/bridge/lib/nest.js+1
@@ -1,5 +1,6 @@
11import { createFactory } from 'react';
22
3+// inspired by recompose/nest
34export default (components = []) => ({ children, ...props }) =>
45 components
56 .map(createFactory)