Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flatlist API #4

Merged
merged 8 commits into from
Jan 14, 2022
Merged

Flatlist API #4

merged 8 commits into from
Jan 14, 2022

Conversation

fortmarek
Copy link
Contributor

Draft PR for using RecyclerListView with FlatList API.

@fortmarek fortmarek changed the title Flatlist api Flatlist API Jan 11, 2022
RecyclerFlatList.tsx Outdated Show resolved Hide resolved
horizontal: boolean;
}

class RFlatList extends React.PureComponent<RFlatListProps> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to use a component instead of a class? 👀

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd keep it a class since functional components inherit from React.Component instead of React.PureComponent. You could achieve the purity with some HoC or by implementing shouldComponentUpdate but that's not really worth it imho.
Additional resources: https://blog.logrocket.com/react-pure-components-functional/

@fortmarek fortmarek marked this pull request as ready for review January 14, 2022 10:54
@fortmarek fortmarek merged commit 9765e60 into main Jan 14, 2022
@ElviraBurchik ElviraBurchik deleted the flatlist-api branch February 10, 2022 09:00
naqvitalha added a commit that referenced this pull request Jul 5, 2022
* added experimental web support

* Fixed inverted mode issue on web

* updated known issues

* added few tests

* added sample for web

* improved sample

* removed local script

* added height update logic

* improved sample

* fixed style issue

* rephrase known issue

* lint fix

* updated e2e screenshot

* fix broken e2e image

* Added sample for CellRenderer and added support to disable autolayout

* some updates to docs

* Added render target support

* data change won't rerender unless renderItem changes

* added test

* Fixed ref warning

* review comments

* review fixes

* fixed script

* build fix

* added changelog

* updated changelog

* updated changelog

* fixed type

* Update CHANGELOG.md

* lint fix

Co-authored-by: Marek Fořt <marek.fort@shopify.com>
This was referenced Aug 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants