react-virtualized icon indicating copy to clipboard operation
react-virtualized copied to clipboard

Strict mode compatibility

Open NeoLegends opened this issue 6 years ago • 19 comments
trafficstars

RV makes use of findDOMNode in WindowScroller and that's deprecated in recent versions of react. You might want to switch this to using refs instead. :)

NeoLegends avatar Mar 28 '19 16:03 NeoLegends

@bvaughn can this be addressed? Concurrent mode is coming and it'd be nice if the library worked smoothly with it.

Ericnr avatar Aug 10 '19 17:08 Ericnr

It also seems to be used in CellMeasurer

jktravis avatar Aug 14 '19 15:08 jktravis

In WindowScroller, it can be avoided by using registerChild render prop

I'm going to open a PR adding the same pattern for CellMeasurer

UPD: #1477

Hypnosphi avatar Dec 30 '19 22:12 Hypnosphi

Even if I use registerChild, WindowScroller doesn't seem to work with StrictMode:

https://codesandbox.io/s/react-virtualized-list-with-width-100-dunc2

You can see that if you scroll list down, new items don't appear. This can mean that there are side effects in places where they shouldn't be

https://reactjs.org/docs/strict-mode.html#detecting-unexpected-side-effects

Hypnosphi avatar Jan 10 '20 01:01 Hypnosphi

Thanks for bringing this up! I kinda lost track of some bugs. Will prioritize!

wuweiweiwu avatar Jan 10 '20 03:01 wuweiweiwu

Would be awesome to get the strict mode issue fixed. Thanks for the great work so far!

makker avatar Jan 14 '20 13:01 makker

Hello! Are there any news on this one? Would be awesome to get rid of those warnings cluttering the console :). Thank you for the effort and the nice library!

HeikkiMoilanen1 avatar Apr 21 '20 10:04 HeikkiMoilanen1

I'd appreciate a fix for this. Thanks for great work!

mika-kaki avatar Apr 21 '20 11:04 mika-kaki

This codesandbox example seems to be fixed after upgrading to RV 9.22, maybe it is related to #1477

Kudo avatar Sep 03 '20 03:09 Kudo

This codesandbox example seems to be fixed after upgrading to RV 9.22, maybe it is related to #1477

This codesandbox isn't working as of 30/09/20. New items are not being rendered

kierancrowntrt avatar Sep 30 '20 12:09 kierancrowntrt

Also keen to see a fix for this. We use react-virtualized and are considering trialing React concurrent and I'm not sure if this will just be an annoyance or cause actual errors.

timminata avatar Apr 23 '21 20:04 timminata

Not sure, why need findDOMNode() here if we already have ref there?

https://github.com/bvaughn/react-virtualized/blob/e360d958b99fa965fd3f1caed4506403ad652cd3/source/Table/Table.js#L342

sergeyzwezdin avatar Sep 12 '21 13:09 sergeyzwezdin

Not sure, why need findDOMNode() here if we already have ref there?

https://github.com/bvaughn/react-virtualized/blob/e360d958b99fa965fd3f1caed4506403ad652cd3/source/Table/Table.js#L342

A simple workaround would be const Grid = this.Grid._scrollingContainer;

reliveyy avatar Oct 25 '21 09:10 reliveyy

@bvaughn please take a look at this problem. It is annoying and takes up space when seeing it at the browser's console. And we can't suppress this warning too.

meotimdihia avatar Apr 01 '22 16:04 meotimdihia

Is this lib still maintained? Issue exists still beginning of 2019...

mleister97 avatar Nov 24 '22 00:11 mleister97

Maybe this is a good alternative to this package. But I didn't have the time to try it yet. https://github.com/tanstack/virtual

sebkasanzew avatar Apr 11 '23 16:04 sebkasanzew

still occuring on 2024

michaelyohanes avatar Feb 23 '24 16:02 michaelyohanes

Also this issue affects my website (which uses Next.js). image

githubdev99 avatar Feb 29 '24 07:02 githubdev99

we had https://github.com/inokawa/virtua ( a new and better package )

meotimdihia avatar Feb 29 '24 08:02 meotimdihia