react-mistyped-props:在React组件中错误输入props的警告

时间:2021-05-03 04:01:41
【文件属性】:
文件名称:react-mistyped-props:在React组件中错误输入props的警告
文件大小:8KB
文件格式:ZIP
更新时间:2021-05-03 04:01:41
JavaScript React错误的道具 react-mistyped-props是一组用于在运行时检测错误输入的props的工具,类似于React.DOM组件如何警告它们。 安装 您可以通过npm安装react-mistyped-props: $ npm install --save react-mistyped-props 用法 只需像往常一样定义您的组件,但将MistypedPropsMixin包含为mixin: var React = require ( "react" ) ; var MistypedPropsMixin = require ( "react-mistyped-props" ) . MistypedPropsMixin ; var MyComponent = React . createClass ( { mixins : [ MistypedPropsMixin ]
【文件预览】:
react-mistyped-props-master
----.jshintrc(214B)
----lib()
--------utils()
--------MistypedPropsMixin.js(573B)
----.travis.yml(81B)
----gulpfile.js(1KB)
----.jscs.json(2KB)
----LICENSE(731B)
----test()
--------.jshintrc(137B)
--------_init.js(112B)
--------MixinSpec.js(2KB)
----README.md(2KB)
----.gitignore(42B)
----index.js(83B)
----package.json(1KB)

网友评论