react-virtualized: Version 10 breaking changes
This issue doesn’t imply that version 10 will be released any time soon. I just want a place to list some ideas so I won’t forget them.
- Remove 
AutoSizerin favor of react-measure (based on the Resize Observer spec, can be polyfilled). This seems like a more future-friendly way of detecting resize. - Remove individual 
Tablerow-level event handler props in favor of an object (egrowEventHandlers) that gets spread on each row. This will enable more flexible event event handling without requiringrowRendererto be override while avoiding unsupported props warnings. - Maybe split some of the HOCs (eg 
WindowScroller,InfiniteLoader) out into their own packages to reduce the clutter and bundle size for people wanting only windowing components? (This was suggested to me by a lib user. I haven’t put much thought into it. Would probably also need to go hand-in-hand with using something like Lerna.) - Consider refactoring 
InfiniteLoaderto be less row-centric (see #973) 
About this issue
- Original URL
 - State: open
 - Created 7 years ago
 - Reactions: 29
 - Comments: 16 (6 by maintainers)
 
Just came across this. Was going to file an issue to see if you wanted to consider a ResizeObserver 😆 I’d be willing to help try and push this through. I would suggest using the polyfill direct. It’s a pretty small amount of code to get it setup. As far as measuring goes, we can attach the observer to the parent node if we need to.
Currently I’m using only Table component (didn’t have a chance to use other components) and got lot of custom editable columns like checkboxes, inputs and selects.
To make them reusable i’m using factories like that:
Not sure if it’s even a good idea in case of perf, but It would be great to have an option to make it work in “react way”:
From what i know there is no difference in named an default exports in terms of tree shakeability.
defaultis just another named export which is treated in a little bit of special manner sometimes.The problem with
defaultexport is that people sometimes use it in slightly wrong manner.Exhibit A:
Exhibit B
What I think should not be dane is that a default export should not act as a namespace and should not gather other things that are intended to be reexported from the package.
You should be noticed
react-measureworks different thanAutoSizer.AutoSizermeasures dimensions outside of container, it helps underlying components, likeGridto calculate visible rows.react-measuremeasures dimensions inside of container.@somi92 please follow the https://github.com/bvaughn/react-virtualized/milestone/1 milestone for updates!
I assume you mean this about default exports of objects that contain many (non-tree-shakeable) keys?
It wouldn’t actually make a difference in a case like:
…right?
Want to formulate my ideas
No, @pke. 😄 I definitely didn’t say that it would be deprecated soon.
This is just a placeholder issue for ideas that I don’t have time to work on now, and I don’t know when I will have time to work on them.