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

replace react-virtualized with react-tiny-virtual-list? #414

Closed
redguardtoo opened this issue Oct 23, 2018 · 9 comments
Closed

replace react-virtualized with react-tiny-virtual-list? #414

redguardtoo opened this issue Oct 23, 2018 · 9 comments

Comments

@redguardtoo
Copy link

react-virtualized is too heavy weight (file size is more than 300Kb) while react-tiny-virtual-list is only 3Kb

@redguardtoo
Copy link
Author

redguardtoo commented Dec 4, 2018

I checked the code. It's just one line import { AutoSizer, List } from 'react-virtualized'; in react-sortable-tree.

I also read code of AutoSizer from react-virtualized. It's just simple function to get parent node size. I suggest writing a built in function to replace it. In the future, we could remove this function. It's not necessary to use AutoSizer.At least in react-windows from same author, looks AutoResizer is not used (https://github.com/bvaughn/react-window/blob/master/src/FixedSizeList.js).

For List, react-tiny-virtual-list seems a better alternative. It's independent package and still actively maintained. It's only one component so the developer could have more resource on it's maintenance than react-virtualized. For example, I noticed you use List.scrollToIndex which still has bug (see bvaughn/react-virtualized#1226)

I could send you a pull request if you'd like to carry on?

@dolezel
Copy link
Collaborator

dolezel commented Dec 4, 2018

Send PR, I will check. Thanks

@af
Copy link

af commented Dec 7, 2018

How does react-tiny-virtual-list compare with react-window? See #425

@wuweiweiwu
Copy link
Member

react window is @bvaughn's rewrite of react virtualized. it exposes a slightly different api and is a bit more efficient

@wuweiweiwu
Copy link
Member

as for react-tiny-virtual-list, ill have to take some time to dig into it

@bvaughn
Copy link

bvaughn commented Dec 7, 2018

react-window should be a viable option for this and is only ~2.5kb if you just import list for what it's worth.

@bvaughn
Copy link

bvaughn commented Dec 7, 2018

Also @clauderic is a punk 😉 😂

@wuweiweiwu
Copy link
Member

haha I think it should work! We can pull in the react-virtualized-autosizer too

@wuweiweiwu
Copy link
Member

closing in favor of #425

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

No branches or pull requests

5 participants