如何解决反应的悬停闪烁? (反应,打字稿,样式化组件)

时间:2020-08-10 03:29:59

标签: reactjs

我正在使用样式组件和React,打字稿。

没有特殊的css语法,也没有代码会导致在悬停期间发生重新渲染,但是每次执行悬停时,某些UI都会闪烁。 Safari和Firefox等其他浏览器可以正常工作,但只能在chrome和chrome canary中使用。

很明显,重新启动已经做了很多事情。

我到处搜索以寻找方法,但是对我来说没有解决方案。 (甚至https://github.com/styled-components/styled-components/issues/2205

  • 我的list1[0] = 500 #list1 ==> [500,20,30,40] # Changed #list2 ==> [10,20,30,40] # Unchanged

package.json

  • 我的{ "name": "", "version": "0.1.0", "private": true, "dependencies": { "@fortawesome/fontawesome-svg-core": "^1.2.25", "@fortawesome/free-brands-svg-icons": "^5.11.2", "@fortawesome/free-regular-svg-icons": "^5.11.2", "@fortawesome/free-solid-svg-icons": "^5.11.2", "@fortawesome/react-fontawesome": "^0.1.7", "@popperjs/core": "^2.4.4", "@types/color-convert": "^1.9.0", "@types/jest": "24.0.22", "@types/lodash": "^4.14.149", "@types/node": "12.12.6", "@types/react": "16.9.11", "@types/react-datepicker": "^2.9.5", "@types/react-dom": "16.9.4", "@types/react-select": "^3.0.8", "@types/uniqid": "^4.1.3", "axios": "^0.19.0", "color-convert": "^2.0.1", "lodash": "^4.17.15", "mobx": "^5.15.0", "mobx-react": "^6.1.4", "moment": "^2.24.0", "react": "^16.11.0", "react-app-polyfill": "^1.0.4", "react-circular-progressbar": "^2.0.3", "react-datepicker": "^2.10.1", "react-dev-utils": "^9.1.0", "react-dom": "^16.11.0", "react-popper": "^2.2.3", "react-router": "^5.1.2", "react-router-dom": "^5.1.2", "react-scripts": "3.2.0", "react-select": "^3.0.8", "react-spinners": "^0.6.1", "semantic-ui-react": "^0.88.1", "styled-components": "^4.4.1", "typescript": "3.6.3", "uniqid": "^5.2.0", "validate-color": "^1.0.6" }, "scripts": { "start": "react-scripts start", "build": "react-scripts build" }, "eslintConfig": { "extends": "react-app" }, "homepage": ".", "browserslist": { "production": [ ">0.2%", "not dead", "not op_mini all" ], "development": [ "last 1 chrome version", "last 1 firefox version", "last 1 safari version" ] }, "devDependencies": { "@types/react-circular-progressbar": "^1.1.0", "@types/react-router": "^5.1.3", "@types/react-router-dom": "^5.1.2", "@types/styled-components": "^5.1.0", "@types/uuid": "^3.4.6", "tslint": "^5.20.1", "tslint-config-prettier": "^1.18.0" } }

globalStyle.ts

我将'NanumSquare'字体用作CDN。

我也附加了视频链接。 https://drive.google.com/file/d/191xhcye4WK1TY8EVm6L4TcnNB7oxVww5/view?usp=sharing

我迫切需要帮助。请帮助我。...

0 个答案:

没有答案