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

ios系统在scrollView组件下滑动时setStatus页面会有一下卡顿 #8433

Open
Moyu-one opened this issue Jan 4, 2021 · 0 comments
Open
Labels
F-react Framework - React T-jd Target - 编译到京东小程序 V-3 Version - 3.x

Comments

@Moyu-one
Copy link

Moyu-one commented Jan 4, 2021

相关平台

京东小程序

小程序基础库: 1.10.12
使用框架: React

复现步骤

`import React, { useState, useEffect } from "react";
import Taro from "@tarojs/taro";
import { View, Text, ScrollView } from "@tarojs/components";
import styles from "./index.module.styl";

function Time() {
const [time, setTime] = useState(0);

useEffect(() => {
const timer = setInterval(() => {
setTime((val) => {
console.log(val, "time ");
return val;
});
}, 1000);

return () => {
  clearInterval(timer);
};

}, []);

return {time};
}

function Index() {
console.log("render");
return (
<ScrollView style={{ height: "100vh" }} scrollY>
天A1
A2
A3
A1
A2
A3
A1
A2
A3
A1
A2
A3
A1
A2
A3

);
}
export default Index;`

期望结果

IOS滑动不卡顿

实际结果

滑动的时发生setStatus会有卡顿

环境信息

Taro CLI 3.0.21 environment info:
    System:
      OS: macOS 10.15.1
      Shell: 5.7.1 - /bin/zsh
    Binaries:
      Node: 14.15.0 - ~/.nvm/versions/node/v14.15.0/bin/node
      Yarn: 1.21.0 - /usr/local/bin/yarn
      npm: 6.14.8 - ~/.nvm/versions/node/v14.15.0/bin/npm
    npmPackages:
      @tarojs/components: 3.0.15 => 3.0.15 
      @tarojs/mini-runner: 3.0.15 => 3.0.15 
      @tarojs/react: 3.0.15 => 3.0.15 
      @tarojs/runtime: 3.0.15 => 3.0.15 
      @tarojs/taro: 3.0.15 => 3.0.15 
      @tarojs/webpack-runner: 3.0.15 => 3.0.15 
      babel-preset-taro: 3.0.15 => 3.0.15 
      react: ^16.14.0 => 16.14.0 
@taro-bot2 taro-bot2 bot added F-react Framework - React T-jd Target - 编译到京东小程序 V-3 Version - 3.x labels Jan 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-react Framework - React T-jd Target - 编译到京东小程序 V-3 Version - 3.x
Projects
None yet
Development

No branches or pull requests

1 participant