vue-hooks:Vue中的实验性React钩子实现

时间:2021-04-06 09:03:42
【文件属性】:
文件名称:vue-hooks:Vue中的实验性React钩子实现
文件大小:5KB
文件格式:ZIP
更新时间:2021-04-06 09:03:42
JavaScript !!! 存档!!! Vue现在拥有自己的受钩子启发的API,用于编写逻辑: : 此PoC已完成其目的,将不再更新。 钩针 在Vue中使用POC。 完全是实验性的,请勿在生产中使用。 React式挂钩 import Vue from "vue" import { withHooks , useState , useEffect } from "vue-hooks" // a custom hook... function useWindowWidth ( ) { const [ width , setWidth ] = useState ( window . innerWidth ) const handleResize = ( ) => { setWidth ( window . innerWidth ) } ; useEffect ( ( ) => {
【文件预览】:
vue-hooks-master
----example3.html(672B)
----.gitignore(14B)
----README.md(3KB)
----package.json(181B)
----index.js(4KB)
----example2.html(957B)
----example.html(2KB)

网友评论