use-watcher-map
TypeScript icon, indicating that this package has built-in type declarations

1.3.0 • Public • Published

useWatcherMap

Control re-renders in React with ease. use-watcher-map uses path subscriptions to ensure components re-render only when relevant data changes.

Examples

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.

Running the Example

  1. Navigate to the example directory:
    cd example
  2. Install dependencies:
    bun install
  3. Run the example
    bun dev

Readme

Keywords

Package Sidebar

Install

npm i use-watcher-map

Weekly Downloads

24

Version

1.3.0

License

MIT

Unpacked Size

42.8 kB

Total Files

23

Last publish

Collaborators

  • lachlanmcmillan