Control re-renders in React with ease. use-watcher-map uses path subscriptions to ensure components re-render only when relevant data changes.
This repository contains a simple example application (example/
) demonstrating the usage of WatcherMap. You can switch between different scenarios using the tabs:
- Simple: Basic usage demonstration.
- SubPath: Demonstrates watching specific sub-paths within the state.
- SubPath Arrays: Shows how to handle arrays within watched sub-paths.
- Navigate to the
example
directory:cd example
- Install dependencies:
bun install
- Run the example
bun dev