JSPM

@vueuse/core

3.0.0-alpha.11
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3463823
  • Score
    100M100P100Q198772F
  • License MIT

Collection of essential Vue Composition API

Package Exports

  • @vueuse/core

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@vueuse/core) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

logo

NPM version Storybook Demos GitHub last commit GitHub issues GitHub stars

Collection of essential Vue Composition API (inspired by react-use)

🚧 Working in progress...

📦 Install

We supports both Vue 3.x and Vue 2.x, you can seamlessly upgrade it when you migrate from Vue 2.x to 3.x.

for Vue 3.x (vue-next)

npm i @vueuse/core@next

for Vue 2.x with composition-api polyfill

npm i @vue/composition-api
npm i @vueuse/core

Please register the Composition API Plugin before other using APIs.

CDN

<!-- For Vue 3.x -->
<script src="https://unpkg.com/@vueuse/core@next"></script> 

<!-- For Vue 2.x -->
<script src="https://unpkg.com/@vueuse/core"></script>

It will be exposed to global variable window.VueUse

⚡ Functions

You can checkout the documents and live demos in Storybook.

  • useCounter
  • useIntervalFn
  • useLocalStorage
  • useLocalStoragePlain
  • useNow
  • useRaf
  • useTimeout
  • useTimeoutFn
  • useWindowScroll
  • useWindowSize

More functions to be added. Please keep turned. (PRs are also welcome!)

📄 License

MIT License © 2019-2020 Anthony Fu