Skip to content

React 相关 #21

@QC-L

Description

@QC-L
  • 在 backbone 里用 react 渲染
  • 在 angular 里用 react 渲染
  • 在 vue 里用 react 渲染
  • 在 xxx 里用 react 渲染
    然后再从 react 里拿出 dom,调用 dom api 或者 用 jQuery 插件, d3 套这个 dom

语言层面:

  • 用 coffee, es5, es6, jsx, ts, tsx 写

react 组件设计:

  • pure component
  • functional component
  • smart, dumb component
  • higher order component
  • hoc render hijacking
  • 会用 props.children React.children cloneElement
  • 提供 instance method
  • context

内部实现:

  • 懂 setState 是异步的
  • 懂 synthetic event
  • 懂 react-dom 分层和 react 没有关系
  • 懂 reconciler
  • 懂 fiber

测试:

  • 会写 jest
  • 会写 snapshot test

炫技:

  • 写一个顺滑的拖拽
  • 用一个 component 递归渲染
  • 写一个 react router

未来:

  • 知道 react 将来要增删哪些 api
  • 用 preact, inferno 替换 react

最最重要:

  • 懂 react 这个单词是什么意思

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions