React-native-web: Recommended approach for big lists?

Created on 24 Jul 2017  路  3Comments  路  Source: necolas/react-native-web

I know many people use RNW and I've also have been following implementation of lists. When I have things like comments for example, in React Native, I load 20 at a time of 1000 comments with a FlatList, and load 20 more as I scroll to the end of the list. But since these lists aren't in RNW yet, what is the recommended approach to handle lists for the time being?

Most helpful comment

In some cases code won't be 100% shareable, so I would recommend making a list.native.js and a list.web.js file and using something like

https://github.com/bvaughn/react-virtualized

In cases like this. To maximize code reuse, abstract both of them so they have the same api.

All 3 comments

In some cases code won't be 100% shareable, so I would recommend making a list.native.js and a list.web.js file and using something like

https://github.com/bvaughn/react-virtualized

In cases like this. To maximize code reuse, abstract both of them so they have the same api.

^ is a good idea. There's some work going on to support the RN lists, but I'm not working on it as it's not something we need at Twitter yet

Thank you both for the info :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bcpugh picture bcpugh  路  3Comments

necolas picture necolas  路  3Comments

holmesal picture holmesal  路  3Comments

DaKaZ picture DaKaZ  路  3Comments

EvanBacon picture EvanBacon  路  3Comments