Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

132
Views
receive unexpected response when click react-virtualized list item
  1. I wrote a simple demo to demonstrate this problem

https://codesandbox.io/s/wizardly-nightingale-449cko

  1. The operation steps for produce the problem
  • click the 2nd div

  • click the 3rd div

console doesn't output as expected:

render ts:  1646305500814

onclick ts:  0

render process has already done, but the function onClick in "App.js" still get the old value. why it happen?

  1. As a comparison, I do another test
  • click the 2nd div

  • click the 1st div

console output as expected:

render ts:  1646305752895

onclick ts:  1646305752895
  1. Further more, in the line 26th of the code file "VirtualList.js", I modify the value of the props rowRenderer from "this.cellRenderer" to "renderItem",

console also output as expected:

render ts: 1646306154833

onclick ts: 1646306154833

In theory, the effect of the function "this.cellRenderer" and "renderItem" should be the same;

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!