Text strings must be rendered within a <Text> component
See original GitHub issueIf 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
Issue Analytics
- State:
- Created 4 years ago
- Reactions:29
- Comments:10
Top Results From Across the Web
Invariant Violation: Text strings must be rendered within a ...
Invariant Violation: Text strings must be rendered within a <Text> component. 99% of cases will be caused by using conditional rendering ...
Read more >How to handle the error “Text strings must be rendered within ...
The first cause for the error is because of bad indentation. It is very necessary that each component is indented properly. The child...
Read more >Text strings must be rendered within a Text component
Hello learners,In this video I have explained why you get this error( Text strings must be rendered within a Text component ) and...
Read more >Text Strings must be rendered within a <Text> component
Invariant Violation: Text strings must be rendered within a component. This error is located at: in RCTView (at View.js:45) in View (at header....
Read more >Text strings must be rendered within a <Text> component ...
Empty string scenario: Let's say one of your variables you're trying to use for conditional rendering evaluates to an empty state. Guess what ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Just saved my ass. Thank you for this 👍
@JayantJoseph sure