Skip to content
/ UseX Public

a collection of hook utilities for quick and smart development

License

Notifications You must be signed in to change notification settings

GStarP/UseX

Repository files navigation

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/usex

Then 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 build

Then 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 vue and @vue/reactivity is 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.

About

a collection of hook utilities for quick and smart development

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published