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
would this be a standalone library #10
Comments
This library will be released as react-window and will not be merged into react-virtualized. Initially, I considered releasing these API changes as version 10 of react-virtualized but decided against it because I don't intend to support as many types of components (like Collection or Masonry) and I don't want to make people choose between upgrading and losing functionality or staying on an old version. I hope react-virtualized will continue to be maintained and released in parallel with this library, and I think there are some lessons learned here that could improve performance for react-virtualized- but that's it. Whether you should build on top of this or react-virtualized is up to you. I won't promise to support all of the API surface for react-virtualized here (e.g. onScrollbarPresenceChange). I think the API surface for react-virtualized got too big and hard to maintain and I'd like to avoid that with this library. Cheers! |
Thanks for you quick response, I also agree we don't need align all the apis from Then I'm going to use this library directly, thanks so much for those great libraries. |
Cool! Let me know how it turns out. 😄 |
It turned out that I have to use a modified version, there are several limitations for my scenario:
I'll let you know when the component is out, then you would have a better understanding on my concerns. |
Hey 😄 Thanks for the feedback. Here are some thoughts.
This has long been the case with react-virtualized as well, as the docs mention. Since neither library (RV or RW) actually takes the "data set" as a prop– changes to the data set would never cause a re-render anyway, unless the item count changed, in which case both
This is also the same key strategy used by react-virtualized. You probably wouldn't notice the issue with RV though because react-window memoizes much more efficiently. A custom This is something I'll have to think about a bit more. 😄
Why do you need this? Exposing APIs like the one you describe can make it harder to maintain, refactor, and optimize the library. I learned this lesson with RV, but once something has been added to the library, it's kind of there forever. I hope to have a much higher bar for this sort of addition with react-window.
I believe you could achieve this same thing by tweaking the |
@bvaughn for the first one, I think you missed my description? I'm talking about the for the second one, I do encounter with some issues because of that with CRUD, if we just remove the for the third one, I explained the scenario why I need that api in RV, as I want to implement auto height feature with CRUD and expanding, I don't wont to recalculate the total height as it's already been done in the library the last one, in that way I still can't get |
Whoops, I did misread your first one. I'll have to give that one some more thought too.
Okay. I don't remember every feature request react-virtualized gets. 😄
Why would you need |
correct, for example, I have a header and a body(Grid) to compose the table, when I scroll the body horizontally, I need to sync the |
Gotcha. This is useful input. I'll give it some thought, at least. No promise to make any changes yet. 😄 |
Cool, cool. I look forward to seeing the changes you make. Maybe some of them can make their way back upstream. I'd also be curious to know about how the changes impact performance (if at all). 😄 The new PS. The demo looks cool! 😄 |
I've given some more thought to your "pure" component comment. I've decided to treat the This means that function components won't be memoized by default, but that's probably okay. If you want to avoid re-renders for complex items, you can extend This change has been published in the new alpha (2). I have not yet decided about the You could work around it by implementing your own |
Okay, after some consideration– I've decided to add a new |
|
for the item, what's the different between pass a BTW, is there any performance concern to memoize |
Subjective preference. I like using
I don't really understand what you're asking, sorry. Typical memoization won't work if you create a new wrapper object each time you call the function. |
This statement still does not make sense to me:
The So I use a memoization wrapper with regular, non-named parameters– (which is fine, because I'm not worried about getting their order messed up locally)– to control when I call the external prop– (which uses named parameters, for users convenience). This is nice because it frees me up from having to explicitly track and compare each individual parameter before calling the function. |
That’s what I expected, thanks. |
@nihgwu - would you consider releasing your table component as open source ? There's a lot we can learn from it as an illustrative example in using react-window. Here's our attempt on the react-virtualized side : |
Here it is, BaseTable with frozen rows and columns support and other features, but based on |
I created a complex
Table
component based onGrid
ofreact-virtualized
, I'm rewriting it now, and I'm not sure that should I use this library directly or wait for it being merged intoreact-virtualized
asv10
.I love the simplicity of this library compare to
react-virtualized
, seems the original purpose of this repo is an api experimental forreact-virtualized
v10, I'm using some apis likeonScrollbarPresenceChange
fromreact-virtualized
which are not available in this library, but I could implement them on my side if I choose to use this library. So I want to make sure what's the future of this library.The text was updated successfully, but these errors were encountered: