### Install valtio and valtio-reactive Source: https://github.com/valtiojs/valtio-reactive/blob/main/README.md Installs the necessary packages for using valtio-reactive, including Valtio itself and the valtio-reactive library. ```bash npm install valtio valtio-reactive ``` -------------------------------- ### Valtio Reactive Usage Example Source: https://github.com/valtiojs/valtio-reactive/blob/main/README.md Demonstrates how to use valtio-reactive with Valtio. It shows creating a reactive state, defining a computed property that depends on the state, and setting up an effect to react to changes in the computed property. Updates are batched for efficiency. ```javascript import { proxy } from 'valtio/vanilla'; import { batch, computed, effect } from 'valtio-reactive'; const state = proxy({ count: 1 }); const derived = computed({ double: () => state.count * 2, }); effect(() => { console.log('double count:', derived.double); }); setInterval(() => { batch(() => { state.count++; state.count++; }); }, 1000); ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.