13 Matching Annotations
  1. Jul 2020
    1. This is one of the reasons many people prefer to combine React with a separate state management library. However, that often introduces too much abstraction, requires you to jump between different files, and makes reusing components more difficult.

      理解redux本身和周边库就比较费劲

    2. Hooks allow you to reuse stateful logic without changing your component hierarchy

      并不是不需要该改变你的组件,而是不需要改变组件的层次结构

  2. Dec 2019
    1. Sources have constrainable properties which have capabilities and settings exposed on tracks. While the constrainable properties are "owned" by the source, sources MAY be able to accomodate different demands at once. For this reason, capabilities are common to any (multiple) tracks that happen to be using the same source, whereas settings MAY differ per track (e.g., if two different track objects bound to the same source query capability and settings information, they will get back the same capabilities, but may get different settings that are tailored to satisfy their individual constraints).

      “能力”是“源”的;“设置”是“轨”的

    2. A source can be a physical webcam, microphone, local video or audio file from the user's hard drive, network resource, or static image.

      “源”可以是物理摄像头、麦克风或用户硬盘、网络上的本地视频、音频、图片

    1. Def. 14: Closure: A closure is a function which captures the environment where it’s defined. Further this environment is used for identifier resolution.

      闭包:一个函数捕获其所在的环境。函数执行时这个环境用于查找该函数用到的标识符。

    2. Def. 7: Execution context: An execution context is a specification device that is used to track the runtime evaluation of the code.

      执行上下文:用于跟踪运行时代码执行的specification device

    3. Def. 6: Constructor: A constructor is a function which is used to create instances, and automatically set their prototype.

      构造器定义:构造器是用于创建实例并自动设置实例prototype的函数

    4. Technically this mechanism is known as dynamic dispatch or delegation.
      • dynamic dispatch: 动态分发
      • delegation: 代理

      C++的非虚函数是static dispatch,虚函数是dynamic dispatch

    5. Def. 3: Prototype chain: A prototype chain is a finite chain of objects used to implement inheritance and shared properties.

      原型链定义:一个用于实现继承和共享属性的有限对象链

    6. The prototype may be either an object or the null value
      let point = {x:10, y:10};
      console.assert(point.__proto__ === Object.prototype);
      console.assert(Object.create(null).__proto__ === undefined);
      console.assert(Object.create(point).__proto__ === point);
      console.assert(Object.prototype.__proto__ === null);