Thomas101 / react-native-fence-html

React Native component that renders HTML as native views
BSD 2-Clause "Simplified" License
177 stars 96 forks source link

ReactPropTypeLocations not found with react 16.0.0-alpha.4 #20

Open arthur31416 opened 7 years ago

arthur31416 commented 7 years ago

When I update to react native on master and react 16.0.0-alpha.4, I get the following error:

Unable to resolve module `react/lib/ReactPropTypeLocations` from `/Users/arthur/Lendix/mobile/node_modules/react-native-fence-html/HTMLStyles.js`

A quick fix is to change the following lines in HTMLStyles.js:

// import ReactPropTypeLocations from 'react/lib/ReactPropTypeLocations'
const ReactPropTypeLocations = {} // added

I have no idea how useful this check is:

if (styleProps[key](testStyle, key, '', ReactPropTypeLocations.prop)) { 
   // ...
}

Any suggestion ?

Thanks

almost commented 7 years ago

I've sent a pull request that fixes the issue. ReactPropTypeLocations was just a keyMirror object so I replaced the property with the corresponding string.

amitbravo commented 7 years ago

I replaced those 3 lines with 2 new ones , did not work yet.

niocncn commented 7 years ago

@almost manually changing make sense! Thanks!)