react-native-panel icon indicating copy to clipboard operation
react-native-panel copied to clipboard

TypeError: Cannot read property 'oneOfType' of undefined

Open redbar0n opened this issue 7 years ago • 1 comments

Getting this error when trying to:

import Panel from 'react-native-panel';

Using these versions, in package.json:

  "dependencies": {
    "react": "16.2.0",
    "react-native": "0.52.0",
    "react-native-panel": "^1.0.3",
  },

redbar0n avatar Mar 02 '18 12:03 redbar0n

I think it's because react-native-panel/src/index.js uses:

import React, { Component, PropTypes } from 'react';

Instead of:

import React, { Component } from 'react';
import PropTypes from 'prop-types';

As this issue from another project indicated: https://github.com/react-native-community/react-native-camera/issues/936

Update: Yeah. Pretty much confirmed it works with the above solution. That fixes it for React 16.

redbar0n avatar Mar 02 '18 12:03 redbar0n