@gstarp/usex v0.1.3
UseX
UseX is a collection of hook utilities for quick and smart development.
Hook utility encapsulates a batch of reusable logic. It usually starts with use.
Install
Only for Browser Env!
NPM
npm i @gstarp/usexThen you can directly import hook utilities and use.
import { useMultipleClick } from '@gstarp/usex'
useMultipleClick(el, cb)Dist File
You can build source code to get dist file, which is also included in the package installed via npm.
git clone git@github.com:GStarP/UseX.git
cd usex
npm i
npm run buildThen you can import dist/usex.min.js in .html file and acceess hook utilities by UseX.
<script src="usex.min.js"></script>
<script>
UseX.useMultipleClick(el, cb)
</script>Reactive Hook
Hooks in reactive dir can provide reactive variants for your reactive rendering. They are based on @vue/reactivity, so you must install this dependency to use reactive hooks.
Make sure the version of
vueand@vue/reactivityis the same, otherwise you will have to do some extra work.
You can also use reactive hooks even if you don't install vue, which means you can use them along with react or whatever. I will write an example to prove it's feasibility.