@act2do/component
TypeScript icon, indicating that this package has built-in type declarations

1.0.5-alpha.0 • Public • Published

编写 react 组件规范(官方推荐)

  • style、className 和 theme 为自定义组件的保留 props 属性(理论上每个组件都有)
  • compName (组件名字), $el (组件的 dom 对象) 为自定义组件的保留属性()
  • 组件模块的名字就是文件夹名字和标签的名字
  • 用到 jsx 的地方一定要命名为 *.jsx
  • 注册事件的回调函数统一需要返回对象形式 {} 的格式, 并且统一返回组件的 emitter: this(组件上下文)
  • 注册事件的回调函数前面一定要加 'on' 前缀

Readme

Keywords

none

Package Sidebar

Install

npm i @act2do/component

Weekly Downloads

1

Version

1.0.5-alpha.0

License

MIT

Unpacked Size

903 kB

Total Files

109

Last publish

Collaborators

  • zenwong