call\apply\bind 模拟实现

  1. // 模拟实现call
  2. // ES6实现
  3. Function.prototype.mycall = function (context) {
  4. context = context ? Object(context) : window;
  5. var fn = Symbol();
  6. context[fn] = this;
  7. let args = [...arguments].slice(1);
  8. let result = context[fn](...args);
  9. delete context[fn]
  10. return result;
  11. }
  12. // 模拟实现bind
  13. Function.prototype.mybind = function (context) {
  14. if (typeof this !== "function") {
  15. throw new Error("请使用函数对象调用我,谢谢!");
  16. }
  17. var self = this;
  18. var args = Array.prototype.slice.call(arguments, 1);
  19. var fNOP = function () { };
  20. var fBound = function () {
  21. var bindArgs = Array.prototype.slice.call(arguments);
  22. return self.myapply(this instanceof fNOP ? this : context, args.concat(bindArgs));
  23. }
  24. fNOP.prototype = this.prototype;
  25. fBound.prototype = new fNOP();
  26. return fBound;
  27. }
  28. // 模拟实现apply
  29. // ES6实现
  30. Function.prototype.myApply = function(context,arg){//apply的第二个参数是数组
  31. context = context ? Object(context) : Window;//强制转化成对象,方便后续在上面添加属性
  32. const symbol = Symbol();//创建唯一标示;
  33. context[symbol] = this;//{name:'a',symbol:function(){...}},这样子symbol默认就能拿到name值了
  34. const result = context[symbol](...arg);//由于参数是数组,所以要解构执行
  35. delete context[symbol];//删除
  36. return result;
  37. }
  38. var c = function(a,b){
  39. return a*(a+b)*(this.c)
  40. }
  41. c.myApply({c:10},[1,1]);

Cookie的属性:domain和path属性,如果想要实现单点登录,可以设置Domain,子域名都能拿到cookie了,

https://juejin.im/post/6886437516698714120?utm_source=gold_browser_extension
domain 指定了该 Cookie 所属的域名,默认情况下,domain 会被设置为创建该 Cookie 时所在的域名。如果不指定,默认为 origin,不包含子域名。如果指定了Domain,则一般包含子域名。 例如,如果设置 Domain=mozilla.org,则 Cookie 也包含在子域名中(如developer.mozilla.org)。而 path 则指定了该 Cookie 所属的路径,注意子路径也会被匹配。例如,设置 Path=/docs,则/docs/Web/ 这个地址也会匹配。domain 和 path 两者一起来限制了该 Cookie 允许被哪些 URL 访问。

Map和Object的区别:

不要将「Map」作为普通「Object」的替代品,而应该是普通对象的补充
image.png
https://juejin.im/post/6846687604042104845

什么是BFC?

BFC 全称为 块格式化上下文 (Block Formatting Context) 。

页面渲染过程:

image.png

1. PureComponent

2. 深度copy:函数、日期、正则,这些无法准确拷贝

3. ES6 class ES5实现

https://www.cnblogs.com/lmyt/p/7446800.html

https://blog.csdn.net/qq_37653449/article/details/83306769

4. node 读取文件权限

5. css + ~

6. css 圆角计算方法

7. es6

8. es6 this

9. 严格模式和非严格模式的区别

  1. 'use strict'
  2. const object1 = {};
  3. Object.defineProperty(object1, 'property1', {
  4. value: 42,
  5. writable: false//通过Object.defineProperty定义了只读属性
  6. });
  7. object1.property1 = 77;//只有严格模式才会报错,这就是严格和非严格区别
  8. // throws an error in strict mode
  9. console.log(object1.property1);
  10. // expected output: 42

10. 页面渲染过程-重绘和重排

Reflow (重排)

当涉及到DOM节点的布局属性发生变化时,就会重新计算该属性,浏览器会重新描绘相应的元素,此过程叫 回流(Reflow)。

Repaint(重绘)

当影响DOM元素可见性的属性发生变化 (如 color) 时, 浏览器会重新描绘相应的元素, 此过程称为 重绘(Repaint)。因此重排必然会引起重绘。

造成重排

调整窗口大小
字体大小
样式表变动
元素内容变化,尤其是输入控件
CSS伪类激活,在用户交互过程中发生
DOM操作,DOM元素增删、修改
width, clientWidth, scrollTop等布局宽高的计算

Repaint和Reflow是不可避免的,只能说对性能的影响减到最小,给出下面几条建议:

  1. 避免逐条更改样式。建议集中修改样式,例如操作className。
  2. 避免频繁操作DOM。创建一个documentFragment或div,在它上面应用所有DOM操作,最后添加到文档里。设置display:none的元素上操作,最后显示出来。
  3. 避免频繁读取元素几何属性(例如scrollTop)。
  4. 绝对定位具有复杂动画的元素。绝对定位使它脱离文档流,避免引起父元素及后续元素大量的回流

11. 跨域

12. DNS(Domain Name Server)域名服务器

13. HTTP请求发起和响应

14. CommonJs,AMD,CMD, ES6 的Module && web components, UMD,SystemJS

UMD

https://zhuanlan.zhihu.com/p/54927867

CommonJs,AMD,CMD, ES6

https://juejin.im/post/5bea425751882508851b45d6#heading-4
Babel 只是把 ES6 模块语法转为 CommonJS 模块语法,然而浏览器是不支持这种模块语法的,所以直接跑在浏览器会报错的,如果想要在浏览器中运行,还是需要使用打包工具将代码打包,webpack把CommonJs模块,包裹一层,注入modules,exports,require,打包成自执行函数。

  1. // 自执行函数
  2. (function(modules) {
  3. // 用于储存已经加载过的模块
  4. window.installedModules = {};
  5. function require(moduleName) {
  6. if (installedModules[moduleName]) {
  7. return installedModules[moduleName].exports;
  8. }
  9. var module = installedModules[moduleName] = {
  10. exports: {}
  11. };
  12. modules[moduleName](module, module.exports, require);
  13. return module.exports;
  14. }
  15. // 加载主模块
  16. return require("main");
  17. })({
  18. "main": function(module, exports, require) {
  19. console.log(JSON.stringify(module));
  20. var addModule = require("./add");
  21. console.log(addModule);
  22. console.log(addModule.add(1, 1))
  23. },
  24. "./add": function(module, exports, require) {
  25. console.log('加载了 add 模块');
  26. // console.log(JSON.stringify(module));
  27. module.exports = {
  28. add: function(x, y) {
  29. return x + y;
  30. }
  31. };
  32. }
  33. })

SystemJS

https://segmentfault.com/a/1190000008563619

15. object.defineproperty

https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty

16. 移动端适配

17. WebGL SVG CA

18. 设计模式 define module widget

19. H5 performance 性能

http://www.cnblogs.com/CraryPrimitiveMan/p/3795086.html

20. 高阶组件

1.Props Proxy: HOC 对传给 WrappedComponent W 的 porps 进行操作,

2.Inheritance Inversion: HOC 继承 WrappedComponent W。

21. ES6 this

使用注意点

箭头函数有几个使用注意点。

(1)函数体内的this对象,就是定义时所在的对象,而不是使用时所在的对象。

(2)不可以当作构造函数,也就是说,不可以使用new命令,否则会抛出一个错误。

(3)不可以使用arguments对象,该对象在函数体内不存在。如果要用,可以用Rest参数代替。

(4)不可以使用yield命令,因此箭头函数不能用作Generator函数。

1.箭头函数有作用域(词法作用域),词法作用域简单来讲就是,一切变量(包括this)都根据作用域链来查找。

2.箭头函数中的this因为绑定了词法作用域,所以始终指向自身外的第一个this(由于自身没有声明this,所以会去作用域链上找this),也就是始终等于调用它的函数的this(以为这个this离它最近)。

3.严格模式下不允许使用arguments(规定),并且,普通函数里 arguments 代表了调用时传入的参数,但是箭头函数不是,箭头函数会把 arguments 当成一个普通的变量,顺着作用域链由内而外地查询(词法作用域)

4.arguments可以用…rest取代,所以完全没必要追求argument。

react 生命周期

init:

porpsType

getDefaultPorps

getInitialState

componentWillMount

reder

componentDidMount

componentWillUnmount

props

componentWillReceiveProps

shouldComonentUpdate

componentWillUpadta

reder

componentDidUpadta

componentWillUnmount

state

sholdComponentUpdata

componentWillUpdate

reder

compontenDidUpdate

componentWillUnmount

react 源码相关

https://blog.kisnows.com/categories/技术/

源码课程:https://react.jokcy.me/book/api/react.html

网页资源缓存机制

promise、async和await之执行顺序的那点事

https://lvdingjin.github.io/tech/2018/05/27/async-and-await.html

Generator 详解(使用场景,babel 转译,协程,异步,上层应用,async/await)
https://segmentfault.com/a/1190000017370622

https://github.com/xitu/gold-miner/blob/master/TODO/how-javascript-works-event-loop-and-the-rise-of-async-programming-5-ways-to-better-coding-with.md

setTimeout

https://blog.csdn.net/yun_hou/article/details/88697954

defer和async的区别

https://segmentfault.com/q/1010000000640869
https://segmentfault.com/a/1190000015057278?utm_source=index-hottest

JavaScript 运行机制详解:再谈Event Loop

http://www.ruanyifeng.com/blog/2014/10/event-loop.html

js中的隐式转换

函数节流和函数去抖

函数节流就是预定一个函数只有在大于等于执行周期时才执行,周期内调用不执行。好像水滴攒到一定重量才会落下一样。
函数防抖就是在函数需要频繁触发情况时,只有足够空闲的时间,才执行一次,会执行只不过要延迟
防抖
函数防抖(debounce): 事件在触发后的 t 时刻执行,如果在这个时间间隔 t 内,又一次触发事件,则重新计算时间。
函数节流(throttle): 在时间间隔 t 内,无论触发多少次事件,最终只执行一次。

  1. var debounce = (fn,delay)=>{
  2. let time = null;
  3. return function(){
  4. const arg = arguments;
  5. const context = this;
  6. clearTimeout(time);
  7. time = setTimeout(()=>{ //这里用箭头函数其实没必要把this传递给context,直接传递this也有效果
  8. fn.apply(context,arg);//传递执行主体和参数,用apply就不用解构arg了,arg本身就是类数组结构
  9. },delay)//延迟执行
  10. }
  11. }
  12. var add = function(c){
  13. console.log(this.a+c);//函数体内部有this,所以这里一定不能用箭头函数,否则this会变成定义时而不是运行时
  14. }
  15. var dAdd = debounce(add,5000);
  16. dAdd.call({a:1},1);//2

节流

  1. const debounce = (fn,wait)=>{
  2. let time = new Date().getTime();//记录当前时间
  3. let timeout = null;
  4. return (...arg)=>{
  5. const content = this;
  6. if(new Date().getTime() - time > wait){
  7. fn.apply(content,arg);//apply 第二个是数组
  8. time = new Date().getTime();//更新time
  9. }
  10. }
  11. }
  12. const b = (x,y)=>console.log(x+y);
  13. const c = debounce(b,5500);

https://www.cnblogs.com/caizhenbo/p/6378202.html

js常见算法(二):从给定的无序、不重复的数组 A 中,取出 N 个数,使其相加和 为 M

https://segmentfault.com/a/1190000015068723

整理面试题:

https://juejin.im/post/5b03e79951882542891913e8

Class

  1. class Person {
  2. constructor (name) {
  3. this.name = name;
  4. }
  5. height(){
  6. console.log(1);
  7. }
  8. static weight(){
  9. console.log(2);
  10. }
  11. }
  12. class Student extends Person {
  13. constructor (name, age) {
  14. super(); //代表父类的构造函数
  15. this.age = age;
  16. }
  17. height(){
  18. super.height(); //指向父类的原型对象
  19. }
  20. static weight(){
  21. super.weight(); //指向父类
  22. }
  23. }
  1. "use strict";
  2. function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
  3. function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
  4. function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
  5. function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }
  6. function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
  7. function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
  8. function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
  9. function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
  10. function _instanceof(left, right) { if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) { return right[Symbol.hasInstance](left); } else { return left instanceof right; } }
  11. function _classCallCheck(instance, Constructor) { if (!_instanceof(instance, Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  12. function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  13. function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
  14. var Person =
  15. /*#__PURE__*/
  16. function () {
  17. function Person(name) {
  18. _classCallCheck(this, Person);
  19. this.name = name;
  20. }
  21. _createClass(Person, [{
  22. key: "height",
  23. value: function height() {
  24. console.log(1);
  25. }
  26. }, {
  27. key: "css",
  28. value: function css() {
  29. console.log(3);
  30. }
  31. }], [{
  32. key: "weight",
  33. value: function weight() {
  34. console.log(2);
  35. }
  36. }]);
  37. return Person;
  38. }();
  39. var Student =
  40. /*#__PURE__*/
  41. function (_Person) {
  42. _inherits(Student, _Person);
  43. function Student(name, age) {
  44. var _this;
  45. _classCallCheck(this, Student);
  46. _this = _possibleConstructorReturn(this, _getPrototypeOf(Student).call(this)); //代表父类的构造函数
  47. _this.age = age;
  48. return _this;
  49. }
  50. _createClass(Student, [{
  51. key: "height",
  52. value: function height() {
  53. _get(_getPrototypeOf(Student.prototype), "height", this).call(this); //指向父类的原型对象
  54. }
  55. }], [{
  56. key: "weight",
  57. value: function weight() {
  58. _get(_getPrototypeOf(Student), "weight", this).call(this); //指向父类
  59. }
  60. }]);
  61. return Student;
  62. }(Person);

一起学react(4) 史上最详细react-redux 源码分析

https://www.jianshu.com/p/b039a062e021

http://cn.redux.js.org/docs/faq/ImmutableData.html#how-react-redux-uses-shallow-checking

多版本并存

NPM & git

BEBAL

Taro 技术揭秘之taro-cli

https://segmentfault.com/a/1190000015340294?utm_source=tag-newest

https://uniapp.dcloud.io/snippet

requestIdleCallback-后台任务调度

http://www.zhangyunling.com/702.html
https://developer.mozilla.org/zh-CN/docs/Web/API/Window/requestIdleCallback

函数编程

React 中创建 Components 的方式有两种:Function and Class

  • 在需要 内部state 或是 生命周期的时候需要用Class
  • Class类继承的生命周期 componentDidMount 和 componentWillUnmount 实现类的销毁组件和释放资源很重要。
  • componentDidMount componentWillUnmount 是生命周期的钩子。

CSS 选择器权重计算规则

https://www.cnblogs.com/dq-Leung/p/4213375.html


    1. 选择器类型

1、ID  #id

2、class  .class

3、标签  p

4、通用  *

5、属性  [type=”text”]

6、伪类  :hover

7、伪元素  ::first-line

8、子选择器、相邻选择器


    1. 权重计算规则

第一等:代表内联样式,如: style=””,权值为1000。

第二等:代表ID选择器,如:#content,权值为0100。

第三等:代表类,伪类和属性选择器,如.content,权值为0010。

第四等:代表类型选择器和伪元素选择器,如div p,权值为0001。

通配符、子选择器、相邻选择器等的。如*、>、+,权值为0000。 继承的样式没有权值。

  • 3.比较规则

1,0,0,0 > 0,99,99,99。也就是说从左往右逐个等级比较,前一等级相等才往后比。

无论是行间、内部和外部样式,都是按照这个规则来进行比较。而不是直观的行间>内部>外部样式;ID>class>元素。之所以有这样的错觉,是因为确实行间为第一等的权重,所以它的权重是最高的。而内部样式可能一般写在了外部样式引用了之后,所以覆盖掉了之前的。

在权重相同的情况下,后面的样式会覆盖掉前面的样式。

通配符、子选择器、相邻选择器等的。虽然权值为0000,但是也比继承的样式优先。

  • 4.!important

在Javascript中,获取到数字超出长度问题

JS中5种原始数据类型

原生类型

  • number:整数/小数/NaN
  • string:
  • boolean:
  • null:
  • undefined:
  • Symbol

引用类型

  • Object

工程化工具的使用(Webpack、ESLint、Yarn、Git、……)

-. git log、git fork、git rebase、git reset、git reverse、git stash、git blame

我来回答饿了么大前端的问题(1)

https://www.jianshu.com/p/85634c6c1cd9

深入剖析 JavaScript 的深复制

https://jerryzou.com/posts/dive-into-deep-clone-in-javascript/

使用 React.Suspense 替换 react-loadable

https://www.youtube.com/watch?v=v6iR3Zk4oDY
https://reactjs.org/blog/2018/03/01/sneak-peek-beyond-react-16.html

  • React 16.x的两大新特性 Time Slicing, Suspense
  • React 16.6:支持代码拆分的 Suspense 组件(已经发布)
  • React 16.8:React Hooks(~ 2019 年 Q1)
  • React 16.9:支持数据提取的 Suspense 组件(~ 2019 年年中)

https://www.zhihu.com/question/268028123/answer/332182059

react 开发者大会

react Virtual DOM diff 算法

将Virtual DOM树转换成real DOM树的最少操作的过程 称为 调和 。

diff策略

React用 三大策略 将O(n^3)复杂度 转化为 O(n)复杂度

策略一(tree diff):
Web UI中DOM节点跨层级的移动操作特别少,可以忽略不计。

策略二(component diff):
拥有相同类的两个组件 生成相似的树形结构,
拥有不同类的两个组件 生成不同的树形结构。

策略三(element diff):
对于同一层级的一组子节点,通过唯一id区分。

tree diff

(1)React通过updateDepth对Virtual DOM树进行层级控制。

(2)对树分层比较,两棵树 只对同一层次节点
进行比较。如果该节点不存在时,则该节点及其子节点会被完全删除,不会再进一步比较。

(3)只需遍历一次,就能完成整棵DOM树的比较。

component diff

(1)同一类型的两个组件,按原策略(层级比较)继续比较Virtual DOM树即可。

(2)同一类型的两个组件,组件A变化为组件B时,可能Virtual DOM没有任何变化,如果知道这点(变换的过程中,Virtual DOM没有改变),可节省大量计算时间,所以 用户 可以通过 shouldComponentUpdate() 来判断是否需要 判断计算。

(3)不同类型的组件,将一个(将被改变的)组件判断为dirty component(脏组件),从而替换 整个组件的所有节点。

element diff

插入

删除

移动

https://www.jianshu.com/p/3ba0822018cf

redux-saga实现与原理

https://segmentfault.com/a/1190000013660033?utm_source=channel-hottest

redux 的原理

react-router 原理

javascript内存管理(堆和栈)和javascript运行机制

https://www.cnblogs.com/web-easy/p/7889184.html

HTTPS和HTTP的区别

  • https需要认证证书,http不需要
  • https是安全加密SSL安全协议,http是明文传输
  • http和https 用的是不同链接方式,http是80 https是443
  • http的连接很简单,是无状态的;HTTPS协议是由SSL+HTTP协议构建的可进行加密传输、身份认证的网络协议,比http协议安全。

https://www.cnblogs.com/wqhwe/p/5407468.html

https://blog.csdn.net/qq_29695087/article/details/52138454

arguments转换为数组

[].slice.apply(arguments);

[…arguments]

array.from

原生实现bind方法

https://juejin.im/post/59093b1fa0bb9f006517b906

JavaScript深入之call和apply的模拟实现

https://github.com/mqyqingfeng/Blog/issues/11

JavaScript深入之从原型到原型链

https://github.com/mqyqingfeng/Blog/issues/2

instanceof, Symbol.hasInstance, Constructor

Symbol.hasInstance 用于判断某对象是否为某构造器的实例。 FooSymbol.hasInstance == foo instanceof Foo

constructor 属性返回对创建此对象的数组函数的引用。

https://blog.csdn.net/mevicky/article/details/50353881

Babel 用户手册

babel执行顺序

Plugin 会运行在 Preset 之前。
Plugin 会从前到后顺序执行。
Preset 的顺序则 刚好相反(从后向前

babel7.x变化

preset 的变更:淘汰 es201x,删除 stage-x,强推 env (重点)
淘汰 es201x 的目的是把选择环境的工作交给 env 自动进行,而stage-x 就没那么好运了,它们直接被删了。这是因为 babel 团队认为为这些 “不稳定的草案” 花费精力去更新 preset 相当浪费。stage-x 虽然删除了,但它包含的插件并没有删除,我们依然可以显式地声明这些插件来获得等价的效果。
为了减少开发者替换配置文件的机械工作,babel 开发了一款 babel-upgrade 的工具,它会检测 babel 配置中的 stage-x 并且替换成对应的 plugins。除此之外它还有其他功能,(总之目的就是让你更加平滑地迁移到 babel 7),babel-upgrade 工具本身也还在开发中,还列出了许多 TODO 没有完成,因此之后的功能可能会更加丰富
把所有 babel- 重命名为 @babel/

https://github.com/jamiebuilds/babel-handbook/blob/master/translations/zh-Hans/user-handbook.md

https://github.com/jamiebuilds/babel-handbook/blob/master/translations/zh-Hans/plugin-handbook.md

https://blog.csdn.net/qq_40171039/article/details/78326344

babel-polyfill VS babel-runtime VS babel-preset-env

https://juejin.im/post/5aefe0a6f265da0b9e64fa54

你真的会用 Babel 吗?

https://juejin.im/post/59b9ffa8f265da06710d8e89#heading-10

判断数据类型

typeof、instanceof、 constructor、 prototype

https://www.cnblogs.com/dushao/p/5999563.html

理解运用JS的闭包、高阶函数、柯里化

https://cloud.tencent.com/developer/article/1326958

深入浅出webpack

https://github.com/gwuhaolin/web-webpack-plugin/blob/master/readme_zh.md#自动探测html入口-demo

http://webpack.wuhaolin.cn/

regenerator

https://segmentfault.com/a/1190000017370622
https://segmentfault.com/a/1190000000515173

web generator:

http://facebook.github.io/regenerator/

co generator:

https://github.com/xiaoxiangdaiyu/co/tree/master

Generator 详解(使用场景,babel 转译,协程,异步,上层应用,async/await)

https://segmentfault.com/a/1190000017370622

proto 、prototype

事件机制

浏览器盒模型的计算方法

CROS 的探测

ruter hash 产生机制

关于javascript函数式编程中compose的实现

https://segmentfault.com/a/1190000008394749

JS数组reduce()方法详解及高级技巧

https://www.jianshu.com/p/e375ba1cfc47

面试题

Expo大作战(一)—什么是expo,如何安装expo clinet和xde,xde如何使用

https://www.cnblogs.com/gdsblog/p/8537594.html

Preload,Prefetch 和它们在 Chrome 之中的优先级著作权归作者所有。

https://www.w3cplus.com/performance/reloading/preload-prefetch-and-priorities-in-chrome.html

webpack

Webpack 加快打包速度的方法

使用 include 或 exclude 加快文件查找速度
使用 HappyPack 开启多进程 Loader 转换
使用 ParallelUglifyPlugin 开启多进程 JS 压缩
使用 DllPlugin + DllReferencePlugin 分离打包
将 库 和 项目代码 分离打包
配置缓存(插件自带 loader,不支持的可以用 cache-loader)

Webpack 加快代码运行速度方法

代码压缩
抽离公共模块
懒加载模块
将小图片转成 base64 以减少请求
预取(prefetch) || 预加载(preload)
精灵图
webpack-bundle-analyzer 代码分析

https://www.jianshu.com/p/1a775dcfe957
http://webpack.wuhaolin.cn/1入门/

webpack plugin

https://blog.51cto.com/13869008/2166334
https://github.com/webpack/docs/wiki/plugins

webpack4.0各个击破(7)—— plugin篇

https://blog.51cto.com/13869008/2166334

https://fengmiaosen.github.io/2017/03/21/webpack-core-code/

React Native 三端同构实战

https://www.ibm.com/developerworks/cn/web/wa-universal-react-native/index.html

浩麟

http://resume.wuhaolin.cn/
https://github.com/gwuhaolin

Vue CLI 3 配置中 Modern mode 是什么

https://www.uis.cc/2018/06/29/What-is-Modern-mode-in-the-Vue-CLI-3-configuration/

为什么用Object.prototype.toString.call(obj)检测对象类型?

https://www.cnblogs.com/youhong/p/6209054.html

btoa和atob

#!/usr/bin/env node

https://blog.csdn.net/weixin_33714884/article/details/91416289

react-router-dom 的 HashRouter 也就这么回事儿

https://juejin.im/post/5ac6f4a7f265da237314b08c?utm_medium=hao.caibaojian.com&utm_source=hao.caibaojian.com

语义化版本 2.0.0

https://semver.org/lang/zh-CN/

/ eslint-disable /

BEM

react-modal

http://reactcommunity.org/react-modal/examples/css_classes.html

SplitChunksPlugin

https://blog.csdn.net/napoleonxxx/article/details/81975186

antd规划

https://github.com/sorrycc/blog/issues/85

https://createapp.dev/

基础知识: https://github.com/ljianshu/Blog

如何优化页面,加快页面的加载速度

(1)优化图片格式和大小;
(2)开启网络压缩;
(3)使用浏览器缓存;
(4)减少重定向请求;
(5)使用CDN存储静态资源;
(6)减少DNS查询次数;
(7)压缩css和js内容

谈谈以前端角度出发做好SEO需要考虑什么?

a. 了解搜索引擎如何抓取网页和如何索引网页
b. meta标签优化
c. 关键词分析
d. 付费给搜索引擎
e. 链接交换和链接广泛度(Link Popularity)
f. 合理的标签使用

call和apply区别

func1.call(this, arg1, arg2); func1.apply(this, [arg1, arg2])