Gracefully deprecate View.propTypes
This commit is contained in:
parent
d83b01e82c
commit
5c18fb656c
|
@ -6,6 +6,7 @@ import {
|
||||||
requireNativeComponent,
|
requireNativeComponent,
|
||||||
View,
|
View,
|
||||||
} from 'react-native'
|
} from 'react-native'
|
||||||
|
import { ViewPropTypes } from './lib'
|
||||||
|
|
||||||
const resolveAssetSource = require('react-native/Libraries/Image/resolveAssetSource')
|
const resolveAssetSource = require('react-native/Libraries/Image/resolveAssetSource')
|
||||||
|
|
||||||
|
@ -87,7 +88,7 @@ const FastImageSourcePropType = PropTypes.shape({
|
||||||
})
|
})
|
||||||
|
|
||||||
FastImage.propTypes = {
|
FastImage.propTypes = {
|
||||||
...View.propTypes,
|
...ViewPropTypes,
|
||||||
source: FastImageSourcePropType,
|
source: FastImageSourcePropType,
|
||||||
onLoadStart: PropTypes.func,
|
onLoadStart: PropTypes.func,
|
||||||
onProgress: PropTypes.func,
|
onProgress: PropTypes.func,
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
import { ViewPropTypes as RNViewPropTypes, View } from 'react-native'
|
||||||
|
|
||||||
|
const ViewPropTypes = RNViewPropTypes || View.propTypes
|
||||||
|
|
||||||
|
export { ViewPropTypes }
|
Loading…
Reference in New Issue