Comments (4)
请教一下楼主,
src/components/articles/articles.js
文件第125行,如下图所示:每次下拉触发ajax请求,取回了一定数量的的数据,每取回一次都要和已经取回的数据进行一次合并操作,当一直往下拉的时候,数据会越来越多,数组越来越大,会不会性能很差呢?
性能会变差的,小数据能这么做,当然有很大数据时最好就不要了,用扩展运算符 ... 会好点。
from blog-react.
这里的 setState 用 prevState 好点吧
from blog-react.
我没用官方 demo 的写法,这么写我感觉不错。code标签就不用你自己写样式了
from blog-react.
查了一下,是 prevState 好;marked 的用法好多的,好用就好。
from blog-react.
Related Issues (9)
- 没找到发文的功能 HOT 1
- 打扰一下 HOT 1
- win10 64位启动项目失败。
- 网站挂了 http://biaochenxuying.cn:2019/
- 我在找一个实习机会,我可以支援你的各种REACT项目
- 第252个star者 HOT 1
- 是不是单文章的seo没有 HOT 1
- 请问一下樱花效果是已有库还是自己写的 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blog-react.