Hoverable:用于可悬停的 React.js 组件的 Mixin

时间:2021-06-21 15:53:44
【文件属性】:
文件名称:Hoverable:用于可悬停的 React.js 组件的 Mixin
文件大小:1KB
文件格式:ZIP
更新时间:2021-06-21 15:53:44
JavaScript 可悬停 可悬停的 React.js 组件的 mixin。 我写这个是因为我厌倦了编写相同的样板代码来处理组件上的悬停状态。 有了这个类,您现在要做的就是将其混合并进行一些最少的布线。 用法 var ThingWithHover = React.createClass({ mixins: [Hoverable] , render: function () { return (
{ this.state.hovered ? : null}
); }); 解释 将{...this.
【文件预览】:
Hoverable-master
----Hoverable.js(774B)
----README.md(799B)

网友评论