Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More →
Socket
Sign inDemoInstall
Socket

@vueuse/core

Package Overview
Dependencies
Maintainers
3
Versions
358
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vueuse/core

Collection of essential Vue Composition Utilities

  • 8.8.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.9M
increased by3.84%
Maintainers
3
Weekly downloads
 
Created

What is @vueuse/core?

The @vueuse/core package is a collection of essential Vue Composition API utilities that help with a wide range of common application needs, from state management to utilities for handling side effects. It's designed to work seamlessly with Vue 3, leveraging the Composition API to make building and managing Vue applications easier and more intuitive.

What are @vueuse/core's main functionalities?

State Management

This feature allows you to easily synchronize a reactive state with localStorage, enabling persistent state across page reloads. The example demonstrates how to store and retrieve user settings.

import { ref } from 'vue'
import { useLocalStorage } from '@vueuse/core'

const userSettings = useLocalStorage('user-settings', { theme: 'dark', notifications: true })

Sensor Utilities

Sensor utilities provide reactive access to browser sensors like mouse position. The example shows how to track the mouse position on the screen.

import { useMouse } from '@vueuse/core'

const { x, y } = useMouse()

Animation

This feature enables easy setup of interval-based side effects, useful for animations or regular data fetching. The code sample demonstrates setting up a simple interval that logs a message every second.

import { useIntervalFn } from '@vueuse/core'

const { pause, resume } = useIntervalFn(() => console.log('Tick'), 1000)

Other packages similar to @vueuse/core

Keywords

FAQs

Package last updated on 06 Jul 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡ïļ by Socket Inc