-
Notifications
You must be signed in to change notification settings - Fork 108
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
Interview Prepare #16
Comments
Event LoopNodehttps://cnodejs.org/topic/5a9108d78d6e16e56bb80882
|
HTTPhttps://halfrost.com/https-begin/ HTTP1.1
HTTP2
https://rain120.github.io/study-notes/engineering/http/version-compare TLS 对称加密、非对称加密http://www.ruanyifeng.com/blog/2014/09/illustration-ssl.html
TCP、UDPTCP 传输控制协议特性
拥塞控制拥塞控制是作用于网络的,它是防止过多的数据注入到网络中,避免出现网络负载过大的情况。
拥塞流量控制流量控制是作用于接收者的,它是控制发送者的发送速度从而使接收者来得及接收,防止分组丢失的。
https://zhuanlan.zhihu.com/p/37379780 UDP 用户数据协议特性
参考 GET vs POST
|
浏览器浏览器缓存本地缓存命中顺序,Service Worker 缓存 => 内存缓存 => HTTP缓存(磁盘缓存) => HTTP/2 Push缓存 当浏览器要请求资源时
https://www.jianshu.com/p/54cc04190252 https://juejin.cn/post/6844903747357769742 https://calendar.perfplanet.com/2016/a-tale-of-four-caches/ 进程、浏览器有哪些线程https://juejin.cn/post/6844903553795014663 浏览器渲染原理https://juejin.cn/post/7039036362653171742 https://www.cnblogs.com/coco1s/p/5439619.html 跨域CORS 简单请求 请求方法包括
请求头仅限于下面这些:
非简单请求 不是简单请求就是非简单请求 配置
|
https://rain120.github.io/study-notes/fe/promise/implement 代码实现
|
React生命周期https://rain120.github.io/study-notes/fe/react/lifecycle Fiber
https://juejin.cn/post/6984949525928476703#heading-20
优先级 从高到底
// https://github.com/facebook/react/blob/caf6d470772d3bf06af5042502579477e367e04f/packages/scheduler/src/forks/Scheduler.js#L60
// Max 31 bit integer. The max integer size in V8 for 32-bit systems.
// Math.pow(2, 30) - 1
// 0b111111111111111111111111111111
var maxSigned31BitInt = 1073741823;
// Times out immediately
var IMMEDIATE_PRIORITY_TIMEOUT = -1;
// Eventually times out
var USER_BLOCKING_PRIORITY_TIMEOUT = 250;
var NORMAL_PRIORITY_TIMEOUT = 5000;
var LOW_PRIORITY_TIMEOUT = 10000;
// Never times out
var IDLE_PRIORITY_TIMEOUT = maxSigned31BitInt; React Fiber的优先级调度机制与事件系统 - 司徒正美的文章 - 知乎 Diff
https://zhuanlan.zhihu.com/p/20346379 Hook
state = {
name: 'Rain120'
age: 20
}
setState({
age: 18
})
// => state = { name: 'Rain120', age: 18 }
const [, setProfile] = useState({
name: 'Rain120'
age: 20
})
setProfile(prev => ({
...prev,
age: 18
}))
Suspense工作原理:
class Suspense extends React.Component {
state = {
promise: null
}
componentDidCatch(e) {
if (e instanceof Promise) {
this.setState({
promise: e
}, () => {
e.then(() => {
this.setState({
promise: null
})
})
})
}
}
render() {
const { fallback, children } = this.props;
const { promise } = this.state;
return <>
{ promise ? fallback : children }
</>
}
} https://juejin.cn/post/6844903789959315470 优化
React 性能优化 | 包括原理、技巧、Demo、工具使用 路由在SPA中
Hash
History HTML5 中提供的 History API
SSR(Server Site Render) |
前端安全策略CSRF 跨站请求伪造(Cross-Site Request Forgery)
XSS
|
|
Typescript
|
工程能力性能监控异常
https://www.zoo.team/article/catch-error 工程化WebpackModule Chunk Bundle的区别Module:不同文件,都会被loader转换成一个模块的,不仅仅是ESM,Commonjs,AMD, etc... Bundle:构建完成后输出的的代码模块 hash chunkhash contenthashhash: 整个项目构建相关 原理entry-option --> compile --> make --> build-bundle --> after-compile --> emit --> after-emit
https://rain120.github.io/study-notes/engineering/webpack/mini-webpack https://mp.weixin.qq.com/s/SbJNbSVzSPSKBe2YStn2Zw 优化https://rain120.github.io/study-notes/engineering/webpack/webpack-optimize Loaderhttps://rain120.github.io/study-notes/engineering/webpack/loader/base 定义: 模块转换器,实现非JS代码转换成Webpack能识别的代码。 pitch: loader上的一个函数,可阻断 loader 执行链。 Loader 生命周期 | ----> L1.pitch ----> L2.pitch ----> |
webpack | | file
| <---- L1 <---- L2 <---- | Plugin定义 Compiler Compilation 生命周期 compile --> compiltion --> make --> optimize --> after-compile --> emit --> after-emit // 1
compiler.plugin('compile', function (params) {
// compile
});
// 2
compiler.plugin('compilation', function (compilation, params) {
// compilation
// 4
compilation.plugin('optimize', function () {
// optimize
});
});
// 3
compiler.plugin('make', function (compiler, callback) {
// make
callback();
});
// 5
compiler.plugin('after-compile', function (compilation) {
// after-compile
});
// 6
compiler.plugin('emit', function (compilation, callback) {
// emit
callback();
});
// 7
compiler.plugin('after-emit', function (compilation) {
// after-emit
}) |
Mobx原理Proxy |
技术能力体现
https://juejin.cn/post/6946210273061502990 |
三剑客
HTML
CSS
Flex
BFC
选择器优先级
预处理器
CSS3 动画
在此之前所有的状态变化,都是即时完成
transition 转换
transform 变形
(transform: translateZ(0) or will-change: transform)
animation 动画
CSS3 Transitions, Transforms和Animation使用简介与应用展示
CSS GPU Animation: Doing It Right
JS
async defer
preload prefetch
preload特点
preload加载的资源是在浏览器渲染机制之前进行处理的,并且不会阻塞onload事件;
preload可以支持加载多种类型的资源,并且可以加载跨域资源;
preload加载的js脚本其加载和执行的过程是分离的。即preload会预加载 相应的脚本代码,待到需要时自行调用;
prefetch
原型链
继承
原型继承
组合继承
寄生继承
闭包
可以让你从内部函数访问外部函数作用域。
BigInt
https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/BigInt
其他
yygmind/blog#43
The text was updated successfully, but these errors were encountered: