react-native-swiper
react-native-swiper copied to clipboard
Text strings must be rendered within a <Text> component
If you pass children with prop title inside Swiper you will get this error Text strings must be rendered within a <Text> component. That because of this terrible line of code https://github.com/leecade/react-native-swiper/blob/master/src/index.js#L702
It is just so wrong solution to reserve prop title for a package assuming that people are not using prop title in items that they pass to to the package, because this is very common property name to use.
I face this crash once a half of year and every time forget about this terribly written line of code. Leaving this issue here in case I forget again, of anyone else face it
Just saved my ass. Thank you for this 👍
Likewise. Have spent the last hour wondering why my code only started breaking because I changed the structure of the types. Thankyou!
Thanks @sintylapse !
You shouldn't have close the issue, it need a PR :)
Thank you so much! :)
Seriously this issue is so weird, so Changing the title prop name solved the issue. Why is that?
this issue still exists, @sintylapse i think its better to re-open this, because i think a lot of people face the same issue and waste a lot of time without even knowing what it is. For me, a single child with prop "title" is not giving any issue, but multiple children with prop "title" is throwing this error. Fixing this issue, or atleast keeping it open would be helpful, i guess (y)
@JayantJoseph sure
Thanks from Brazil. Took me a good 30 minutes to find this one.
OMG, thx for that bro
Thank you for saved my debugging time
Cheers mate! You save my day.
Thanks for saving my time 🫶🏻
@sintylapse Thanks a lott for saving my ass😥 have been wondering over this issue for the past two days.