console doesn't output as expected:
render ts: 1646305500814onclick ts: 0
render process has already done, but the function onClick in "App.js" still get the old value. why it happen?
3、as a comparison, i do another test
click the 2nd div
click the 1st div
console output as expected:
render ts: 1646305752895onclick ts: 1646305752895
4、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: 1646306154833onclick ts: 1646306154833
In theory, the effect of the function "this.cellRenderer" and "renderItem" should be the same;
i beg your pardon
1、i wrote a simple demo to demostrate this problem
https://codesandbox.io/s/wizardly-nightingale-449cko
2、the operation steps for produce the problem
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?
3、as a comparison, i do another test
console output as expected:
render ts: 1646305752895
onclick ts: 1646305752895
4、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;
========================================
above all;
appreciated your answers
please help me; thank you very much;