17 Matching Annotations
  1. Jun 2020
    1. A Design Pattern provides a scheme for refining the subsystems or components of a software system, or the relationships between them. It describes a commonly recurring structure of communicating components that solves a general design problem within a particular context.
  2. May 2020
    1. the end user is using a slow internet connection, especially mobile connection,the end user is running an underpowered device, for example an older generation mobile device,

      Web applications rendered mostly/fully by JS will become an issue if the target demographic falls into one of these two groups.

    1. functional update form of setState. It lets us specify how the state needs to change without referencing the current state

      For effects that require updating frequent-changing states, use the functional update form of setState to avoid getting into infinite loops.

    1. only the assigned variable name addVariable can be used to refer & execute it.

      Named function defined via function expression cannot be called with its name but the variable name it is assigned to, except for the function calling itself.

    2. addFunction overshadows the addVariable in call stack of debugging tools.

      Assigning name to function defined in function expression results in seeing the name shown in the call stack during debugging, instead of the variable name it is assigned to.

    1. a DOM mutation that is visible to the user must fire synchronously before the next paint so that the user does not perceive a visual inconsistency. (The distinction is conceptually similar to passive versus active event listeners.) For these types of effects, React provides one additional Hook called useLayoutEffect

      useLayoutEffect() is the counterpart to useEffect() that is meant for using with the types of work that cannot be deferred. Effects defined using useLayoutEffect get fired synchronously before the next paint.

    2. This makes it suitable for the many common side effects, like setting up subscriptions and event handlers, because most types of work shouldn’t block the browser from updating the screen.

      useEffect() is for using with the types of work that shouldn't block the browser from updating the screen.

    1. Note that a HOC doesn’t modify the input component, nor does it use inheritance to copy its behavior. Rather, a HOC composes the original component by wrapping it in a container component. A HOC is a pure function with zero side-effects.

      The essence of the decorator pattern.

  3. Apr 2018
  4. Dec 2017
    1. The number of transactions the blockchain can process can never exceed that of a single node that is participating in the network.

      Not sure if I understand this correctly. Does this mean the number of transactions that a blockchain-powered network can process is equivalent to the number of transactions that the slowest node in the network can process? If so, I haven't heard such limitation.