1.Uncaught TypeError: Super expression must either be null or a function, not
原因 在組件化繼承React.Component 時 將Component 寫成了小寫component 導致這個錯 所以在react native 中一定要注意大小寫。
2.在自己編輯了一個繼承Component後在別的地方引用總是有問題,提示找不到這個組件,可能的原因
a.可能是你的引用地址沒寫對。
b.可能是你的文件名後面沒有寫.js
c.可能是你的文件沒有export defult filename 或者module.export = className
(其中export 方式引用要用import 而 module 引用則需要用require(路徑))
3.在你編寫一個function 後再return中返回一個view 但是總是顯示不出來這個view 可能的原因:
a.標籤<View> 要與 return 並排。