React Native Invariant Violation: Text strings must be rendered within a component.


項目中有時我們會遇到如下錯誤:

Invariant Violation: Text strings must be rendered within a <Text> component.

解決辦法:

仔細檢查代碼,一般該錯誤都是語法錯誤引起

示例:

 

 

查找許久,終於找到了原因:

原來是語法錯誤,多寫了個;

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM