在陣營原生0.39渲染,陣營本地視圖與明確設置寬度/高度,但以0 flexBasis
我經常會收到這樣的錯誤,但我真的不明白爲什麼(APPART,我沒這個事實沒有設置flexGrow ...)。
下面是從控制檯錯誤
View was rendered with explicitly set width/height but with a 0 flexBasis. (This might be fixed by changing flex: to flexGrow:) View: <RCTShadowView: 0x6080005a02a0; viewName: RCTView; reactTag: 2608; frame: {{0, 0}, {nan, nan}}>
可以給我這樣的人解釋爲什麼會觸發這個錯誤?
編輯:這個錯誤來自該位的樣板代碼我加在主視圖:
flex: 1,
// remove width and height to override fixed static size
width: null,
height: null,
但如果有人能闡明反應,原生樣式光或使我很好的資源,我會感激:)
骯髒的方式:替換柔性:與flexGrow:如果你有寬度和高度 –
這就是錯誤說...但爲什麼? –
我遇到了同樣的問題= = – subei