dwicao / react-native-panel

A Customizable React Native Panel for Android and iOS
https://npmjs.com/package/react-native-panel
35 stars 6 forks source link

TypeError: Cannot read property 'oneOfType' of undefined #4

Open redbar0n opened 6 years ago

redbar0n commented 6 years ago

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 commented 6 years ago

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.