react native 報錯:cannot add a child that doesnot have a YogoNode to a parent without a measure function!
如圖:
原因是:
1.該錯誤一般是因爲render方法中註釋語句寫法不正確,render的return函數裏面的註釋語句應該寫在 {} 裏面,而不是直接 //,正確寫法:{/*註釋語句 */}
2.有字符串沒有寫在Text裏面,字符串一定只能寫在Text裏面
react native 報錯:cannot add a child that doesnot have a YogoNode to a parent without a measure function!
如圖:
原因是:
1.該錯誤一般是因爲render方法中註釋語句寫法不正確,render的return函數裏面的註釋語句應該寫在 {} 裏面,而不是直接 //,正確寫法:{/*註釋語句 */}
2.有字符串沒有寫在Text裏面,字符串一定只能寫在Text裏面