0.59, 0.60
在section list 中嵌入section list时出错:
ExceptionsManager.js:86 Invariant Violation: Invariant Violation: [104893,"RCTView",471,{"height":"<<NaN>>"}] is not usable as a native method argument
This error is located at:
in RCTView (at View.js:35)
in View (at VirtualizedList.js:875)
in RCTView (at View.js:35)
in View (at VirtualizedList.js:1054)
in VirtualizedList (at VirtualizedSectionList.js:211)
in VirtualizedSectionList (at SectionList.js:309)
in SectionList (at Home/index.tsx:205)
in ItemWithSeparator (at VirtualizedSectionList.js:328)
in RCTView (at View.js:35)
in View (at VirtualizedList.js:1770)
in CellRenderer (at VirtualizedList.js:688)
in RCTScrollContentView (at ScrollView.js:1007)
in RCTScrollView (at ScrollView.js:1147)
in ScrollView (at VirtualizedList.js:1081)
in VirtualizedList (at VirtualizedSectionList.js:211)
in VirtualizedSectionList (at SectionList.js:309)
in SectionList (at Home/index.tsx:290)
in RCTView (at View.js:35)
in View (created by MenuProvider)
in RCTView (at View.js:35)
in View (created by MenuProvider)
in MenuProvider (at PopupMenu/index.tsx:89)
in PopupMenu (at Home/index.tsx:288)
in RCTView (at View.js:35)
in View (at Home/index.tsx:287)
in RCTView (at View.js:35)
调试下报错: ExceptionsManager.js:94 Malformed calls from JS: field sizes are different.
通过getItemLayout设置高度,解决问题.
其它参考:
https://github.com/GeekyAnts/NativeBase/issues/2649
https://github.com/react-native-community/react-native-svg/issues/1041
https://stackoverflow.com/questions/48619393/react-native-is-not-usable-as-a-native-method-argument
网友评论