How to use the inferno-compat.PropTypes.func function in inferno-compat

To help you get started, we’ve selected a few inferno-compat 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 zanettin / inferno-apollo / src / ApolloProvider.tsx View on Github external
/* tslint:disable:no-unused-variable */
import ApolloClient, { ApolloStore } from 'apollo-client';
/* tslint:enable:no-unused-variable */

import invariant = require('invariant');

export declare interface ProviderProps {
  store?: Store;
  immutable?: boolean;
  client: ApolloClient;
}

export default class ApolloProvider extends Component {
  static propTypes = {
    store: PropTypes.shape({
      subscribe: PropTypes.func.isRequired,
      dispatch: PropTypes.func.isRequired,
      getState: PropTypes.func.isRequired,
    }),
    client: PropTypes.object.isRequired,
    immutable: PropTypes.bool,
    children: PropTypes.element.isRequired,
  };

  static childContextTypes = {
    store: PropTypes.object,
    client: PropTypes.object.isRequired,
  };

  static contextTypes = {
    store: PropTypes.object,
  };
github zanettin / inferno-apollo / src / ApolloProvider.tsx View on Github external
/* tslint:enable:no-unused-variable */

import invariant = require('invariant');

export declare interface ProviderProps {
  store?: Store;
  immutable?: boolean;
  client: ApolloClient;
}

export default class ApolloProvider extends Component {
  static propTypes = {
    store: PropTypes.shape({
      subscribe: PropTypes.func.isRequired,
      dispatch: PropTypes.func.isRequired,
      getState: PropTypes.func.isRequired,
    }),
    client: PropTypes.object.isRequired,
    immutable: PropTypes.bool,
    children: PropTypes.element.isRequired,
  };

  static childContextTypes = {
    store: PropTypes.object,
    client: PropTypes.object.isRequired,
  };

  static contextTypes = {
    store: PropTypes.object,
  };

  constructor(props, context) {