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.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

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(
  '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('rpc', rpc);
export const mock = ProviderPlugin.create('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('rpc', rpc);
export const mock = ProviderPlugin.create('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 1 year ago

Package Health Score

57 / 100
Full package analysis

Similar packages