Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Table]虚拟表格在react18中使用createrender快速滚动时出现闪烁空白 #4331

Closed
shijunfeng opened this issue Apr 28, 2023 · 5 comments
Assignees
Labels
⚡️ Performance Stale not active for a lone time

Comments

@shijunfeng
Copy link

Component

Table

Reproduction link

Edit on CodeSandbox

Steps to reproduce

虚拟表格在react18中使用createrender快速滚动时出现闪烁空白,入口文件以如下方式则没有问题:
import ReactDOM from 'react-dom';
import Test from './App';

ReactDOM.render(, document.getElementById('root'));

@lakerswgq
Copy link
Contributor

我自己试了下 6 倍 cpu 降速才能感觉到,你的机器配置是什么样的

@shijunfeng
Copy link
Author

我自己试了下 6 倍 cpu 降速才能感觉到,你的机器配置是什么样的

image

@shijunfeng
Copy link
Author

我自己试了下 6 倍 cpu 降速才能感觉到,你的机器配置是什么样的

如果是我机器配置垃圾,那改成ReactDOM.rende 就可以提升6倍CPU的性能。显然不太可能

@shijunfeng
Copy link
Author

我自己试了下 6 倍 cpu 降速才能感觉到,你的机器配置是什么样的

请修改示例代码中的index.js文件,将内容修改为如下代码,拖拽右侧滚动轴观察两种代码的效果差异。
import ReactDOM from 'react-dom';
import App from "./App";
ReactDOM.render(, document.getElementById ('root'));

@shijunfeng
Copy link
Author

image
index.js文件中改成这种写法就不会出现闪烁空白的情况

@YunMeng99 YunMeng99 added the 🐞 Bug Something isn't working label Aug 21, 2023
@eternalsky eternalsky added Stale not active for a lone time and removed 🐞 Bug Something isn't working labels May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚡️ Performance Stale not active for a lone time
Projects
None yet
Development

No branches or pull requests

5 participants