From dd0f1de3d18f0b7ab978f907eab451196ad50c22 Mon Sep 17 00:00:00 2001 From: Nicolas Gallagher Date: Thu, 14 Sep 2017 11:08:36 -0700 Subject: [PATCH] [fix] avoid prop types check on UnimplementedView Fix #635 --- src/components/Touchable/TouchableWithoutFeedback.js | 4 ++-- src/components/UnimplementedView/index.js | 7 +------ 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/components/Touchable/TouchableWithoutFeedback.js b/src/components/Touchable/TouchableWithoutFeedback.js index 4ab8b985..59964079 100644 --- a/src/components/Touchable/TouchableWithoutFeedback.js +++ b/src/components/Touchable/TouchableWithoutFeedback.js @@ -19,7 +19,7 @@ import StyleSheet from '../../apis/StyleSheet'; import TimerMixin from 'react-timer-mixin'; import Touchable from './Touchable'; import warning from 'fbjs/lib/warning'; -import { bool, element, func, number, string } from 'prop-types'; +import { bool, func, number, string } from 'prop-types'; type Event = Object; @@ -33,7 +33,7 @@ const PRESS_RETENTION_OFFSET = { top: 20, left: 20, right: 20, bottom: 30 }; * If you wish to have several child components, wrap them in a View. */ -/* eslint-disable react/prefer-es6-class */ +/* eslint-disable react/prefer-es6-class, react/prop-types */ const TouchableWithoutFeedback = createReactClass({ displayName: 'TouchableWithoutFeedback', mixins: [TimerMixin, Touchable.Mixin], diff --git a/src/components/UnimplementedView/index.js b/src/components/UnimplementedView/index.js index d0c5dfc1..5d0c34ab 100644 --- a/src/components/UnimplementedView/index.js +++ b/src/components/UnimplementedView/index.js @@ -11,18 +11,13 @@ */ import View from '../View'; -import { any, object } from 'prop-types'; import React, { Component } from 'react'; /** * Common implementation for a simple stubbed view. */ +/* eslint-disable react/prop-types */ class UnimplementedView extends Component { - static propTypes = { - children: any, - style: object - }; - setNativeProps() { // Do nothing. // This method is required in order to use this view as a Touchable* child.