fawaz-ahmed / react-native-read-more

React native library to show text in a condensed way and expand when needed. Drop in replacement for Text component and highly customizable. Can be used with expo or native cli for react native.
https://www.npmjs.com/package/@fawazahmed/react-native-read-more
MIT License
275 stars 37 forks source link

Warning: Invalid argument supplied to oneOfType. Expected an array of check functions, but received an object at index 4. #11

Closed Ahmed-ab96 closed 4 years ago

Ahmed-ab96 commented 4 years ago

It works fine, but show this warning 1

fawaz-ahmed commented 4 years ago

It works fine, but show this warning 1

Can you please share what props and data are you passing ?

Ahmed-ab96 commented 4 years ago

Here is my code

<ReadMore
      seeMoreText='زیاتر'
      seeMoreStyle={{fontFamily:'Speda',color:'crimson'}}
      seeLessText='کەمتر'
      seeLessStyle={{fontFamily:'Speda',color:'crimson'}}
      numberOfLines={3}
     >
    <Text style={[HomeStyle.SecondaryText,{textAlign:'auto'}]}>{Item.Description}</Text>
</ReadMore>

and only by importing ReadMore without using it, that warning will appear.

fawaz-ahmed commented 4 years ago

Here is my code

<ReadMore
      seeMoreText='زیاتر'
      seeMoreStyle={{fontFamily:'Speda',color:'crimson'}}
      seeLessText='کەمتر'
      seeLessStyle={{fontFamily:'Speda',color:'crimson'}}
      numberOfLines={3}
     >
    <Text style={[HomeStyle.SecondaryText,{textAlign:'auto'}]}>{Item.Description}</Text>
</ReadMore>

and only by importing ReadMore without using it, that warning will appear.

Resolved issue with PR

Please upgrade to version 1.0.9