awesome's People
awesome's Issues
Web安全
Nodejs 相关
rxjs 学习笔记
Recently learned
CSS 相关
1
HTTP 相关
微前端
React 实现原理
- react高阶组件
- setstate 同步还是异步
- 一文彻底搞懂react hooks的原理和实现
- React Hooks 原理与最佳实践
- React Hooks 原理
- react hoos 实现
- Redux 原理
- React的调度
- 深入剖析 React Concurrent
- 「源码解析 」这一次彻底弄懂react-router路由原理
- 手写系列-实现一个铂金段位的 React
- React的秘密
JS 是单线程的,浏览器是多线程的,除了 JS 线程以外,还包括 UI 渲染线程、事件线程、定时器触发线程、HTTP 请求线程等等。JS 线程是可以操作 DOM 的,如果在操作 DOM 的同时 UI 线程也在进行渲染的话,就会发生不可预期的展示结果,因此 JS 线程与 UI 渲染线程是互斥的,每当 JS 线程执行时,UI 渲染线程会挂起,UI 更新会被保存在队列中,等待 JS 线程空闲后立即被执行。对于事件线程而言,当一个事件被触发时该线程会把事件添加到队列末尾,等待 JS 线程空闲后处理。因此,长时间的 JS 持续执行,就会造成 UI 渲染线程长时间地挂起,触发的事件也得不到响应,用户层面就会感知到页面卡顿甚至卡死了,Sync 模式下的问题就由此引起。
那么 JS 执行时间多久会是合理的呢?这里就需要提到帧率了,大多数设备的帧率为 60 次/秒,也就是每帧消耗 16.67 ms 能让用户感觉到相当流畅。浏览器的一帧中包含如下图过程:
异步可中断更新可以理解为:更新在执行过程中可能会被打断(浏览器时间分片用尽或有更高优任务插队),当可以继续执行时恢复之前执行的中间状态。
react filber 主要实现了可中断的异步更新.
- Scheduler(调度器)—— 调度任务的优先级,高优任务优先进入Reconciler
- Reconciler(协调器)—— 负责找出变化的组件
- Renderer(渲染器)—— 负责将变化的组件渲染到页面上
GO
C++ 学习笔记
数据结构与算法
混合开发
hybird
pwa
redux
三大原则
- 单一数据源
- state 只读
- 使用 纯函数来修改
API
- createStore: createStore(reducer, [preloadedState], enhancer)
- combineReducers(reducers)
- applyMiddleware(...middlewares)
- compose(...functions)
- Store
- getState()
- dispatch(action)
- subscribe(listener)
- replaceReducer(nextReducer)
immer.js:也许更适合你的immutable js库
精读《Immer.js》源码
如何用React+Redux+ImmutableJS
react-redux源码解析
面试
面试
Daily-Interview-Question
typescript
Nodejs
JS
web安全
[万字总结] 一文吃透 Webpack 核心原理
React
微前端
NodeJs
- koa2
css
前端工程化
网络
浏览器相关
数据结构与算法
数据管理
javascript
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.