How to use the fusion-react.ProviderPlugin.create function in fusion-react

To help you get started, we’ve selected a few fusion-react examples, based on popular ways it is used in public projects.

github fusionjs / fusionjs / fusion-plugin-i18n-react / src / plugin.js View on Github external
}
  getChildContext() {
    return {i18n: this.i18n};
  }
  render() {
    return React.Children.only(this.props.children);
  }
}
BundleSplitConsumer.contextTypes = {
  splitComponentLoaders: PropTypes.array,
};
BundleSplitConsumer.childContextTypes = {
  i18n: PropTypes.object.isRequired,
};

export default ProviderPlugin.create<I18nDepsType, I18nServiceType>(
  'i18n',
  i18n,
  BundleSplitConsumer
);
github fusionjs / fusionjs / fusion-plugin-rpc-redux-react / src / plugin.js View on Github external
/** Copyright (c) 2018 Uber Technologies, Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 * @flow
 */

import {ProviderPlugin} from 'fusion-react';
import rpc, {mock as RPCMock} from 'fusion-plugin-rpc';
import type {RPCType, RPCDepsType} from 'fusion-plugin-rpc';

export default ProviderPlugin.create<RPCDepsType, RPCType>('rpc', rpc);
export const mock = ProviderPlugin.create<RPCDepsType, RPCType>('rpc', RPCMock);
github fusionjs / fusionjs / fusion-plugin-rpc-redux-react / src / plugin.js View on Github external
/** Copyright (c) 2018 Uber Technologies, Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 * @flow
 */

import {ProviderPlugin} from 'fusion-react';
import rpc, {mock as RPCMock} from 'fusion-plugin-rpc';
import type {RPCType, RPCDepsType} from 'fusion-plugin-rpc';

export default ProviderPlugin.create<RPCDepsType, RPCType>('rpc', rpc);
export const mock = ProviderPlugin.create<RPCDepsType, RPCType>('rpc', RPCMock);
github fusionjs / fusionjs / fusion-plugin-universal-events-react / src / plugin.js View on Github external
/** Copyright (c) 2018 Uber Technologies, Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 * @flow
 */
import type {
  UniversalEventsDepsType,
  UniversalEventsType,
} from 'fusion-plugin-universal-events';

import UniversalEvents from 'fusion-plugin-universal-events';
import {ProviderPlugin} from 'fusion-react';

export default ProviderPlugin.create<
  UniversalEventsDepsType,
  UniversalEventsType
>('universalEvents', UniversalEvents);

fusion-react

FusionJS entry point for React universal rendering

MIT
Latest version published 2 months ago

Package Health Score

74 / 100
Full package analysis

Similar packages