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

Why scrollTimeout is state?

Open jongmoon opened this issue 8 years ago • 0 comments

First of all, I want to thank you for your great job.

I've checked performance for this component using Perf and I found needless render call.

Last tables means wasted time.

image

And It is caused by scrollTimeout is managed as a state. So I change this value as a Infinite's property.. this.scrollTimeout (from this.state.scrollTimeout).

As a result of above. I can remove needless render call. and I didn't recognize any abnormality after modifying.

But I wonder why scrollTimeout is managed as state instead of normal (private) variable. Thank you in advance.

jongmoon avatar Jun 29 '17 02:06 jongmoon