RecyclerListView needs to have a bounded size

See original GitHub issue

Hi, I’ve been trying to use this component following the example in the README but it gives me the following error:

RecyclerListView needs to have a bounded size. Currently height or, width is 0

If I comment these lines it works perfectly: https://github.com/Flipkart/recyclerlistview/blob/77d479126595879c3c3c78cd402ba89bb253964c/src/core/RecyclerListView.tsx#L326-L328

I’ve logged the values of layout and this._layout and they are {height: 0, width: 0} and {width: 414, x: 0, height: 0, y: 0}` respectively.

The only particularity of my usage is the RecyclerListView is on a TabNavigator. Any idea why this might be happening?

The code of my app is here in case you might want to take a look (it’s ReasonML, though 😦 ) https://github.com/erizocosmico/myfosdem/blob/feature/recyclerlistview/re/components/eventList.re#L90-L140

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:21 (2 by maintainers)

github_iconTop GitHub Comments

39reactions
ashokkumar88commented, Apr 10, 2018

wrap the <RecyclerListView /> inside <View style={{flex:1}}> </View> like below:

<View style={{flex:1}}>
<RecyclerListView />
 </View>
19reactions
peteroidcommented, May 14, 2018

@naqvitalha Just wonder if I can add style={{ minHeight: 1, minWidth: 1 }} to hot fix this error?

Read more comments on GitHub >

github_iconTop Results From Across the Web

RecyclerListView Error in React Native APP - Stack Overflow
LayoutException : RecyclerListView needs to have a bounded size. Currently height or, width is 0.Consider adding style={{flex:1}} or, ...
Read more >
Recyclerlistview needs to have a bounded size : r/reactnative
Recyclerlistview needs to have a bounded size. Hello,. I know there a posts where I can solve this issue but this dont work...
Read more >
ScrollView - React Native Archive
In order to bound the height of a ScrollView, either set the height of the view directly (discouraged) or make sure all parent...
Read more >
@shopify/flash-list | Yarn - Package Manager
Add support for layout animations. https://github.com/Shopify/flash-list/pull/183 ; Suppress recyclerlistview's bounded size exception for some missing cases.
Read more >
RecyclerListView: High performance ListView for React Native ...
Animation frame rate (Fixed with Native Driver); ListView/FlatList Performance. We've lot of areas in the app where we have to display huge list ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found