![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
@vueuse/nuxt
Advanced tools
@vueuse/nuxt is a Nuxt.js module that integrates VueUse, a collection of essential Vue Composition Utilities for Vue 2 and 3. It provides a wide range of reactive utilities and composable functions to enhance your Vue.js development experience.
State Management
This feature allows you to easily manage state with localStorage. The `useLocalStorage` function synchronizes a reactive variable with localStorage, making it persistent across page reloads.
```javascript
<script setup>
import { useLocalStorage } from '@vueuse/core'
const name = useLocalStorage('name', 'John Doe')
</script>
<template>
<input v-model="name" placeholder="Enter your name" />
<p>Your name is: {{ name }}</p>
</template>
```
Sensors
This feature provides reactive utilities for various sensors. The `useMouse` function, for example, tracks the mouse position and makes it reactive, allowing you to easily use it in your templates.
```javascript
<script setup>
import { useMouse } from '@vueuse/core'
const { x, y } = useMouse()
</script>
<template>
<p>Mouse position: ({{ x }}, {{ y }})</p>
</template>
```
Network
This feature provides utilities to reactively track network status. The `useOnline` function, for example, allows you to determine if the user is online or offline and react accordingly in your templates.
```javascript
<script setup>
import { useOnline } from '@vueuse/core'
const isOnline = useOnline()
</script>
<template>
<p v-if="isOnline">You are online</p>
<p v-else>You are offline</p>
</template>
```
The `vue-composition-api` package provides a way to use the Vue 3 Composition API in Vue 2 projects. While it offers similar reactive utilities, it does not come with the extensive collection of composable functions that @vueuse/nuxt provides.
Pinia is a state management library for Vue that offers a simpler and more intuitive API compared to Vuex. While it focuses on state management, it does not provide the wide range of reactive utilities that @vueuse/nuxt offers.
This is an add-on of VueUse, which provides better Nuxt integration auto-import capabilities.
Install the vueuse module into your application using nuxi:
npx nuxi@latest module add vueuse
Or use npm:
npm i @vueuse/nuxt @vueuse/core
// nuxt.config
export default defineNuxtConfig({
modules: [
'@vueuse/nuxt',
],
})
The following utils are disabled from auto-import for Nuxt to avoid conflicts with Nuxt's built-in utils:
toRef
toRefs
toValue
useFetch
useCookie
useHead
useTitle
useStorage
useImage
You can always use them by explicitly import from @vueuse/core
MIT License © 2021-PRESENT Anthony Fu
FAQs
VueUse Nuxt Module
The npm package @vueuse/nuxt receives a total of 203,900 weekly downloads. As such, @vueuse/nuxt popularity was classified as popular.
We found that @vueuse/nuxt demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.